From 1f26b7d2c90f998faf7666d8b8cecab7009ae970 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 30 Mar 2022 00:12:18 +0200 Subject: [PATCH 1/2] Remove `node_modules` from vcs --- .gitignore | 3 + node_modules/.bin/_mocha | 15 - node_modules/.bin/_mocha.cmd | 17 - node_modules/.bin/_mocha.ps1 | 18 - node_modules/.bin/flat | 15 - node_modules/.bin/flat.cmd | 17 - node_modules/.bin/flat.ps1 | 18 - node_modules/.bin/he | 15 - node_modules/.bin/he.cmd | 17 - node_modules/.bin/he.ps1 | 18 - node_modules/.bin/js-yaml | 15 - node_modules/.bin/js-yaml.cmd | 17 - node_modules/.bin/js-yaml.ps1 | 18 - node_modules/.bin/mkdirp | 15 - node_modules/.bin/mkdirp.cmd | 17 - node_modules/.bin/mkdirp.ps1 | 18 - node_modules/.bin/mocha | 15 - node_modules/.bin/mocha.cmd | 17 - node_modules/.bin/mocha.ps1 | 18 - node_modules/.bin/rimraf | 15 - node_modules/.bin/rimraf.cmd | 17 - node_modules/.bin/rimraf.ps1 | 18 - node_modules/.bin/semver | 15 - node_modules/.bin/semver.cmd | 17 - node_modules/.bin/semver.ps1 | 18 - node_modules/.bin/ts-node | 15 - node_modules/.bin/ts-node.cmd | 17 - node_modules/.bin/ts-node.ps1 | 18 - node_modules/.bin/ts-script | 15 - node_modules/.bin/ts-script.cmd | 17 - node_modules/.bin/ts-script.ps1 | 18 - node_modules/.bin/tsc | 15 - node_modules/.bin/tsc.cmd | 17 - node_modules/.bin/tsc.ps1 | 18 - node_modules/.bin/tsserver | 15 - node_modules/.bin/tsserver.cmd | 17 - node_modules/.bin/tsserver.ps1 | 18 - node_modules/.bin/which | 15 - node_modules/.bin/which.cmd | 17 - node_modules/.bin/which.ps1 | 18 - node_modules/@types/events/LICENSE | 21 - node_modules/@types/events/README.md | 16 - node_modules/@types/events/index.d.ts | 28 - node_modules/@types/events/package.json | 60 - node_modules/@types/glob/LICENSE | 21 - node_modules/@types/glob/README.md | 16 - node_modules/@types/glob/index.d.ts | 87 - node_modules/@types/glob/package.json | 67 - node_modules/@types/minimatch/LICENSE | 21 - node_modules/@types/minimatch/README.md | 16 - node_modules/@types/minimatch/index.d.ts | 214 - node_modules/@types/minimatch/package.json | 59 - node_modules/@types/mocha/LICENSE | 21 - node_modules/@types/mocha/README.md | 16 - node_modules/@types/mocha/index.d.ts | 2986 --- node_modules/@types/mocha/package.json | 77 - 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 | 144 - node_modules/@types/node/base.d.ts | 41 - node_modules/@types/node/buffer.d.ts | 16 - node_modules/@types/node/child_process.d.ts | 359 - node_modules/@types/node/cluster.d.ts | 261 - node_modules/@types/node/console.d.ts | 3 - node_modules/@types/node/constants.d.ts | 279 - node_modules/@types/node/crypto.d.ts | 369 - node_modules/@types/node/dgram.d.ts | 97 - node_modules/@types/node/dns.d.ts | 292 - node_modules/@types/node/domain.d.ts | 16 - node_modules/@types/node/events.d.ts | 29 - node_modules/@types/node/fs.d.ts | 2296 -- node_modules/@types/node/globals.d.ts | 999 - node_modules/@types/node/http.d.ts | 268 - node_modules/@types/node/http2.d.ts | 859 - node_modules/@types/node/https.d.ts | 51 - node_modules/@types/node/index.d.ts | 91 - node_modules/@types/node/inspector.d.ts | 3162 --- node_modules/@types/node/module.d.ts | 3 - node_modules/@types/node/net.d.ts | 251 - node_modules/@types/node/os.d.ts | 192 - node_modules/@types/node/package.json | 201 - node_modules/@types/node/path.d.ts | 159 - node_modules/@types/node/perf_hooks.d.ts | 241 - node_modules/@types/node/process.d.ts | 3 - node_modules/@types/node/punycode.d.ts | 12 - node_modules/@types/node/querystring.d.ts | 17 - node_modules/@types/node/readline.d.ts | 135 - node_modules/@types/node/repl.d.ts | 372 - node_modules/@types/node/stream.d.ts | 294 - node_modules/@types/node/string_decoder.d.ts | 9 - node_modules/@types/node/timers.d.ts | 16 - node_modules/@types/node/tls.d.ts | 371 - node_modules/@types/node/trace_events.d.ts | 61 - node_modules/@types/node/ts3.2/globals.d.ts | 8 - 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 | 15 - node_modules/@types/node/url.d.ts | 104 - node_modules/@types/node/util.d.ts | 170 - node_modules/@types/node/v8.d.ts | 28 - node_modules/@types/node/vm.d.ts | 64 - node_modules/@types/node/worker_threads.d.ts | 124 - node_modules/@types/node/zlib.d.ts | 141 - node_modules/@types/vscode/LICENSE | 21 - node_modules/@types/vscode/README.md | 16 - node_modules/@types/vscode/index.d.ts | 9684 --------- node_modules/@types/vscode/package.json | 57 - node_modules/agent-base/.travis.yml | 24 - node_modules/agent-base/History.md | 113 - node_modules/agent-base/README.md | 145 - node_modules/agent-base/index.d.ts | 43 - node_modules/agent-base/index.js | 170 - node_modules/agent-base/package.json | 72 - node_modules/agent-base/patch-core.js | 51 - .../agent-base/test/ssl-cert-snakeoil.key | 15 - .../agent-base/test/ssl-cert-snakeoil.pem | 12 - node_modules/agent-base/test/test.js | 728 - node_modules/ansi-colors/LICENSE | 21 - node_modules/ansi-colors/README.md | 274 - node_modules/ansi-colors/index.js | 114 - node_modules/ansi-colors/package.json | 156 - node_modules/ansi-colors/symbols.js | 46 - node_modules/ansi-colors/types/index.d.ts | 161 - 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/ansi-styles/index.js | 165 - node_modules/ansi-styles/license | 9 - node_modules/ansi-styles/package.json | 92 - node_modules/ansi-styles/readme.md | 147 - node_modules/applicationinsights/LICENSE | 8 - node_modules/applicationinsights/README.md | 449 - node_modules/applicationinsights/package.json | 98 - node_modules/arepl-backend/LICENSE | 21 - node_modules/arepl-backend/README.md | 189 - node_modules/arepl-backend/eval.test.js | 270 - node_modules/arepl-backend/eval.test.js.map | 1 - node_modules/arepl-backend/eval.test.ts | 305 - node_modules/arepl-backend/index.js | 225 - node_modules/arepl-backend/index.js.map | 1 - node_modules/arepl-backend/index.ts | 289 - node_modules/arepl-backend/package.json | 83 - node_modules/arepl-backend/python/README.md | 7 - .../python/arepl_custom_handlers.py | 98 - .../arepl-backend/python/arepl_dump.py | 54 - .../arepl-backend/python/arepl_examples.py | 392 - .../python/arepl_jsonpickle/__init__.py | 85 - .../python/arepl_jsonpickle/backend.py | 281 - .../python/arepl_jsonpickle/compat.py | 36 - .../python/arepl_jsonpickle/ext/__init__.py | 0 .../python/arepl_jsonpickle/ext/numpy.py | 345 - .../python/arepl_jsonpickle/ext/pandas.py | 227 - .../python/arepl_jsonpickle/handlers.py | 237 - .../python/arepl_jsonpickle/pickler.py | 669 - .../python/arepl_jsonpickle/tags.py | 52 - .../python/arepl_jsonpickle/unpickler.py | 710 - .../python/arepl_jsonpickle/util.py | 536 - .../python/arepl_jsonpickle/version.py | 1 - .../python/arepl_module_logic.py | 25 - .../arepl-backend/python/arepl_overloads.py | 89 - .../arepl-backend/python/arepl_pickler.py | 120 - .../python/arepl_python_evaluator.py | 605 - .../arepl-backend/python/arepl_saved.py | 119 - .../arepl-backend/python/arepl_settings.py | 26 - .../python/arepl_stdlib_list/__init__.py | 24 - .../python/arepl_stdlib_list/_version.py | 1 - .../python/arepl_stdlib_list/base.py | 39 - .../python/arepl_stdlib_list/fetch.py | 71 - .../python/arepl_stdlib_list/lists/3.2.txt | 300 - .../python/arepl_stdlib_list/lists/3.3.txt | 309 - .../python/arepl_stdlib_list/lists/3.4.txt | 317 - .../python/arepl_stdlib_list/lists/3.5.txt | 321 - .../python/arepl_stdlib_list/lists/3.6.txt | 322 - .../python/arepl_stdlib_list/lists/3.7.txt | 325 - .../python/arepl_stdlib_list/lists/3.8.txt | 1766 -- .../python/arepl_stdlib_list/stdlibTest.py | 12 - .../arepl-backend/python/arepl_user_error.py | 31 - .../python/astunparse/__init__.py | 20 - .../python/astunparse/__main__.py | 48 - .../python/astunparse/printer.py | 51 - .../python/astunparse/unparser.py | 905 - .../arepl-backend/python/blackify.bat | 1 - node_modules/arepl-backend/python/codegen.py | 577 - .../arepl-backend/python/linter_req.txt | 1 - .../arepl-backend/python/requirements.txt | 3 - node_modules/arepl-backend/python/six.py | 982 - .../python/testDataFiles/README.md | 1 - .../arepl-backend/python/testDataFiles/foo.py | 2 - .../python/testDataFiles/foo2.py | 3 - .../python/testDataFiles/importVar.py | 2 - .../python/testDataFiles/varToImport.py | 1 - .../arepl-backend/python/test_arepl_dump.py | 54 - .../arepl-backend/python/test_handlers.py | 39 - .../arepl-backend/python/test_pickler.py | 122 - .../python/test_python_evaluator.py | 440 - node_modules/arg/LICENSE.md | 21 - node_modules/arg/README.md | 280 - node_modules/arg/index.d.ts | 31 - node_modules/arg/index.js | 144 - node_modules/arg/package.json | 69 - 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/package.json | 74 - node_modules/async-hook-jl/.eslintrc | 21 - node_modules/async-hook-jl/.npmignore | 2 - node_modules/async-hook-jl/.travis.yml | 11 - node_modules/async-hook-jl/LICENSE.md | 19 - node_modules/async-hook-jl/README.md | 63 - node_modules/async-hook-jl/async-hook.js | 134 - node_modules/async-hook-jl/index.js | 31 - node_modules/async-hook-jl/package.json | 68 - .../async-hook-jl/patches/next-tick.js | 57 - node_modules/async-hook-jl/patches/promise.js | 64 - node_modules/async-hook-jl/patches/timers.js | 117 - node_modules/async-hook-jl/test/runner.js | 55 - .../async-hook-jl/test/test-conflict-match.js | 11 - .../test/test-conflict-mismatch.js | 13 - .../test/test-fsaccess-disabled.js | 33 - .../test/test-fsaccess-enabled.js | 75 - .../async-hook-jl/test/test-hooks-remove.js | 48 - .../async-hook-jl/test/test-hooks-twice.js | 47 - .../test/test-immediate-clear-in-callback.js | 38 - .../test/test-immediate-clear.js | 59 - .../test/test-immediate-didthrow.js | 46 - .../test/test-immediate-disabled.js | 42 - .../test/test-immediate-enabled.js | 76 - .../test/test-immediate-exception.js | 32 - .../test/test-immediate-non-function.js | 21 - .../test/test-interval-clear-in-callback.js | 38 - .../async-hook-jl/test/test-interval-clear.js | 59 - .../test/test-interval-didthrow.js | 46 - .../test/test-interval-disabled.js | 42 - .../test/test-interval-enabled.js | 86 - .../test/test-interval-exception.js | 32 - .../test/test-interval-non-function.js | 21 - .../test/test-nexttick-didthrow.js | 46 - .../test/test-nexttick-disabled.js | 34 - .../test/test-nexttick-enabled.js | 76 - .../test/test-nexttick-exception.js | 32 - .../test/test-nexttick-non-function.js | 21 - .../async-hook-jl/test/test-parent.js | 58 - .../test/test-promise-catch-enabled.js | 75 - ...mise-catch-then-chain-fulfilled-enabled.js | 80 - .../test/test-promise-disabled.js | 72 - ...omise-then-catch-chain-rejected-enabled.js | 81 - ...-promise-then-fulfilled-chained-enabled.js | 80 - .../test-promise-then-fulfilled-enabled.js | 79 - ...promise-then-fulfilled-multiple-enabled.js | 75 - .../test-promise-then-rejected-enabled.js | 75 - .../async-hook-jl/test/test-promise-timing.js | 75 - .../test/test-stackfilter-eval.js | 9 - .../test/test-timeout-clear-in-callback.js | 38 - .../async-hook-jl/test/test-timeout-clear.js | 59 - .../test/test-timeout-didthrow.js | 46 - .../test/test-timeout-disabled.js | 42 - .../test/test-timeout-enabled.js | 72 - .../test/test-timeout-exception.js | 32 - .../test/test-timeout-non-function.js | 21 - node_modules/async-hook-jl/yarn.lock | 900 - node_modules/async-listener/.travis.yml | 23 - node_modules/async-listener/LICENSE | 25 - node_modules/async-listener/README.md | 55 - .../async-listener/es6-wrapped-promise.js | 37 - node_modules/async-listener/glue.js | 488 - node_modules/async-listener/index.js | 674 - node_modules/async-listener/package.json | 77 - .../async-listener/test/add-remove.tap.js | 39 - .../connection-handler-disconnects.tap.js | 74 - ...clistener-error-multiple-handled.simple.js | 78 - ...asynclistener-error-multiple-mix.simple.js | 67 - ...istener-error-multiple-unhandled.simple.js | 80 - .../core-asynclistener-error-net.simple.js | 110 - ...ynclistener-error-throw-in-after.simple.js | 56 - ...r-error-throw-in-before-multiple.simple.js | 79 - ...nclistener-error-throw-in-before.simple.js | 56 - ...ynclistener-error-throw-in-error.simple.js | 72 - .../test/core-asynclistener-error.simple.js | 229 - ...re-asynclistener-nexttick-remove.simple.js | 137 - .../core-asynclistener-only-add.simple.js | 133 - ...core-asynclistener-remove-before.simple.js | 55 - ...nclistener-remove-inflight-error.simple.js | 50 - ...re-asynclistener-remove-inflight.simple.js | 53 - .../test/core-asynclistener.simple.js | 191 - .../core/core-asynclistener-add-inflight.js | 58 - ...listener-error-throw-in-before-inflight.js | 59 - .../test/errors-this-tick.tap.js | 70 - .../test/fork-listen2-problem.tap.js | 33 - .../async-listener/test/fork-listener.js | 31 - .../test/function-length-preserved.tap.js | 24 - .../async-listener/test/handle.tap.js | 34 - .../async-listener/test/http-request.tap.js | 307 - .../test/native-promises.tap.js | 2236 -- .../test/no-after-following-error.tap.js | 31 - .../test/overlapping-nexttick.tap.js | 192 - .../async-listener/test/promise-subclass.js | 22 - .../test/simple-counter-with-io.tap.js | 28 - .../async-listener/test/simple-counter.tap.js | 29 - .../test/simplified-error.simple.js | 67 - node_modules/async-listener/test/spawn.tap.js | 100 - .../async-listener/test/timers.tap.js | 159 - node_modules/async-listener/test/zlib.tap.js | 214 - 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/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/browser-stdout/LICENSE | 5 - node_modules/browser-stdout/README.md | 40 - node_modules/browser-stdout/index.js | 25 - node_modules/browser-stdout/package.json | 50 - node_modules/buffer-from/LICENSE | 21 - node_modules/buffer-from/index.js | 69 - node_modules/buffer-from/package.json | 56 - node_modules/buffer-from/readme.md | 69 - node_modules/callsite/.npmignore | 4 - node_modules/callsite/History.md | 10 - node_modules/callsite/Makefile | 6 - node_modules/callsite/Readme.md | 44 - node_modules/callsite/index.js | 10 - node_modules/callsite/package.json | 52 - 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/chalk/index.js | 228 - node_modules/chalk/index.js.flow | 93 - node_modules/chalk/license | 9 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 131 - .../chalk/node_modules/supports-color/license | 9 - .../node_modules/supports-color/package.json | 89 - .../node_modules/supports-color/readme.md | 66 - node_modules/chalk/package.json | 109 - node_modules/chalk/readme.md | 314 - node_modules/chalk/templates.js | 128 - node_modules/chalk/types/index.d.ts | 97 - node_modules/cliui/CHANGELOG.md | 51 - node_modules/cliui/LICENSE.txt | 14 - node_modules/cliui/README.md | 115 - node_modules/cliui/index.js | 324 - node_modules/cliui/package.json | 104 - node_modules/cls-hooked/CHANGELOG.md | 214 - node_modules/cls-hooked/LICENSE | 22 - node_modules/cls-hooked/README.md | 293 - node_modules/cls-hooked/context-legacy.js | 420 - node_modules/cls-hooked/context.js | 477 - node_modules/cls-hooked/index.js | 15 - node_modules/cls-hooked/package.json | 96 - node_modules/code-point-at/index.js | 32 - node_modules/code-point-at/license | 21 - node_modules/code-point-at/package.json | 74 - node_modules/code-point-at/readme.md | 32 - 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/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 - .../continuation-local-storage/.eslintrc | 19 - .../continuation-local-storage/.travis.yml | 14 - .../continuation-local-storage/CHANGELOG.md | 168 - .../continuation-local-storage/LICENSE | 22 - .../continuation-local-storage/README.md | 273 - .../continuation-local-storage/context.js | 212 - .../continuation-local-storage/package.json | 79 - .../test/async-context.tap.js | 18 - .../test/async-no-run-queue-multiple.tap.js | 23 - .../test/bind-emitter.tap.js | 378 - .../test/bind.tap.js | 45 - .../test/crypto.tap.js | 82 - .../test/dns.tap.js | 206 - .../test/error-handling.tap.js | 144 - .../continuation-local-storage/test/fs.tap.js | 892 - .../test/interleave-contexts.tap.js | 58 - .../test/monkeypatching.tap.js | 55 - .../test/namespaces.tap.js | 29 - .../test/nesting.tap.js | 73 - .../test/net-events.tap.js | 45 - .../test/promises.tap.js | 121 - .../test/proper-exit.tap.js | 17 - .../test/run-and-return.tap.js | 40 - .../test/simple.tap.js | 42 - .../test/timers.tap.js | 76 - .../test/tracer-scenarios.tap.js | 338 - .../test/zlib.tap.js | 28 - 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/package.json | 111 - 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 | 87 - 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/decache/.travis.yml | 8 - node_modules/decache/README.md | 68 - node_modules/decache/decache.d.ts | 3 - node_modules/decache/decache.js | 81 - node_modules/decache/package.json | 76 - node_modules/decache/setup.js | 1 - node_modules/decache/test/test.js | 85 - node_modules/decamelize/index.js | 13 - node_modules/decamelize/license | 21 - node_modules/decamelize/package.json | 76 - node_modules/decamelize/readme.md | 48 - 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 - .../diagnostic-channel-publishers/LICENSE | 21 - .../diagnostic-channel-publishers/README.md | 31 - .../package.json | 78 - node_modules/diagnostic-channel/LICENSE | 21 - node_modules/diagnostic-channel/README.md | 161 - node_modules/diagnostic-channel/package.json | 68 - node_modules/diff/CONTRIBUTING.md | 39 - node_modules/diff/LICENSE | 31 - node_modules/diff/README.md | 211 - node_modules/diff/package.json | 101 - node_modules/diff/release-notes.md | 247 - node_modules/diff/runtime.js | 3 - node_modules/diff/yarn.lock | 5729 ----- node_modules/emitter-listener/.travis.yml | 7 - node_modules/emitter-listener/README.md | 44 - node_modules/emitter-listener/listener.js | 172 - node_modules/emitter-listener/package.json | 69 - .../emitter-listener/test/basic.tap.js | 193 - 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/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/es6-promise/CHANGELOG.md | 155 - node_modules/es6-promise/LICENSE | 19 - node_modules/es6-promise/README.md | 97 - node_modules/es6-promise/auto.js | 4 - node_modules/es6-promise/es6-promise.d.ts | 85 - node_modules/es6-promise/package.json | 110 - node_modules/es6-promisify/README.md | 89 - node_modules/es6-promisify/package.json | 76 - node_modules/escape-string-regexp/index.js | 11 - node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 86 - node_modules/escape-string-regexp/readme.md | 27 - node_modules/execa/index.js | 361 - node_modules/execa/license | 9 - node_modules/execa/package.json | 105 - node_modules/execa/readme.md | 327 - node_modules/find-up/index.js | 46 - node_modules/find-up/license | 9 - node_modules/find-up/package.json | 88 - node_modules/find-up/readme.md | 87 - node_modules/flat/.travis.yml | 5 - node_modules/flat/LICENSE | 12 - node_modules/flat/README.md | 187 - node_modules/flat/cli.js | 39 - node_modules/flat/index.js | 110 - node_modules/flat/package.json | 74 - node_modules/flat/test/test.js | 513 - 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 | 64 - 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 | 102 - 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-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/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 | 81 - node_modules/glob/sync.js | 486 - node_modules/growl/.eslintrc.json | 14 - node_modules/growl/.tags | 195 - node_modules/growl/.tags1 | 166 - node_modules/growl/.travis.yml | 21 - node_modules/growl/History.md | 77 - node_modules/growl/Readme.md | 109 - node_modules/growl/package.json | 71 - node_modules/growl/test.js | 31 - node_modules/has-flag/index.js | 8 - node_modules/has-flag/license | 9 - node_modules/has-flag/package.json | 81 - 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 | 113 - 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/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/he/LICENSE-MIT.txt | 20 - node_modules/he/README.md | 379 - node_modules/he/bin/he | 148 - node_modules/he/he.js | 345 - node_modules/he/man/he.1 | 78 - node_modules/he/package.json | 94 - node_modules/http-proxy-agent/.travis.yml | 22 - node_modules/http-proxy-agent/History.md | 101 - node_modules/http-proxy-agent/README.md | 74 - node_modules/http-proxy-agent/index.js | 111 - node_modules/http-proxy-agent/package.json | 69 - .../test/ssl-cert-snakeoil.key | 15 - .../test/ssl-cert-snakeoil.pem | 12 - node_modules/http-proxy-agent/test/test.js | 303 - node_modules/https-proxy-agent/.editorconfig | 37 - node_modules/https-proxy-agent/.eslintrc.js | 86 - node_modules/https-proxy-agent/History.md | 124 - node_modules/https-proxy-agent/README.md | 137 - node_modules/https-proxy-agent/index.d.ts | 22 - node_modules/https-proxy-agent/index.js | 241 - node_modules/https-proxy-agent/package.json | 70 - node_modules/inflight/LICENSE | 15 - node_modules/inflight/README.md | 37 - node_modules/inflight/inflight.js | 54 - node_modules/inflight/package.json | 63 - node_modules/inherits/LICENSE | 16 - node_modules/inherits/README.md | 42 - node_modules/inherits/inherits.js | 1 - node_modules/inherits/inherits_browser.js | 23 - node_modules/inherits/package.json | 59 - node_modules/inherits/test.js | 25 - node_modules/invert-kv/index.js | 15 - node_modules/invert-kv/license | 9 - node_modules/invert-kv/package.json | 68 - node_modules/invert-kv/readme.md | 25 - node_modules/is-buffer/LICENSE | 21 - node_modules/is-buffer/README.md | 53 - node_modules/is-buffer/index.js | 11 - node_modules/is-buffer/package.json | 84 - 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-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-fullwidth-code-point/index.js | 46 - node_modules/is-fullwidth-code-point/license | 21 - .../is-fullwidth-code-point/package.json | 82 - .../is-fullwidth-code-point/readme.md | 39 - 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-wsl/index.js | 25 - node_modules/is-wsl/license | 21 - node_modules/is-wsl/package.json | 75 - node_modules/is-wsl/readme.md | 28 - 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/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/index.js | 7 - .../js-yaml/node_modules/.bin/esparse | 15 - .../js-yaml/node_modules/.bin/esparse.cmd | 17 - .../js-yaml/node_modules/.bin/esparse.ps1 | 18 - .../js-yaml/node_modules/.bin/esvalidate | 15 - .../js-yaml/node_modules/.bin/esvalidate.cmd | 17 - .../js-yaml/node_modules/.bin/esvalidate.ps1 | 18 - .../js-yaml/node_modules/esprima/ChangeLog | 235 - .../js-yaml/node_modules/esprima/LICENSE.BSD | 21 - .../js-yaml/node_modules/esprima/README.md | 46 - .../node_modules/esprima/bin/esparse.js | 139 - .../node_modules/esprima/bin/esvalidate.js | 236 - .../js-yaml/node_modules/esprima/package.json | 141 - node_modules/js-yaml/package.json | 97 - node_modules/lcid/index.js | 23 - node_modules/lcid/lcid.json | 203 - node_modules/lcid/license | 9 - node_modules/lcid/package.json | 83 - node_modules/lcid/readme.md | 35 - 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/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 | 67 - 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/log-symbols/browser.js | 7 - node_modules/log-symbols/index.js | 20 - node_modules/log-symbols/license | 9 - node_modules/log-symbols/package.json | 86 - node_modules/log-symbols/readme.md | 45 - node_modules/make-error/LICENSE | 5 - node_modules/make-error/README.md | 111 - node_modules/make-error/index.d.ts | 40 - node_modules/make-error/index.js | 147 - node_modules/make-error/package.json | 84 - node_modules/map-age-cleaner/license | 9 - node_modules/map-age-cleaner/package.json | 95 - node_modules/map-age-cleaner/readme.md | 67 - node_modules/mem/index.d.ts | 96 - node_modules/mem/index.js | 88 - node_modules/mem/license | 9 - node_modules/mem/package.json | 82 - node_modules/mem/readme.md | 167 - node_modules/mimic-fn/index.d.ts | 54 - node_modules/mimic-fn/index.js | 13 - node_modules/mimic-fn/license | 9 - node_modules/mimic-fn/package.json | 78 - node_modules/mimic-fn/readme.md | 69 - node_modules/minimatch/LICENSE | 15 - node_modules/minimatch/README.md | 209 - node_modules/minimatch/minimatch.js | 923 - node_modules/minimatch/package.json | 69 - node_modules/minimist/.travis.yml | 4 - node_modules/minimist/LICENSE | 18 - node_modules/minimist/example/parse.js | 2 - node_modules/minimist/index.js | 187 - node_modules/minimist/package.json | 75 - node_modules/minimist/readme.markdown | 73 - node_modules/minimist/test/dash.js | 24 - node_modules/minimist/test/default_bool.js | 20 - node_modules/minimist/test/dotted.js | 16 - node_modules/minimist/test/long.js | 31 - node_modules/minimist/test/parse.js | 318 - node_modules/minimist/test/parse_modified.js | 9 - node_modules/minimist/test/short.js | 67 - node_modules/minimist/test/whitespace.js | 8 - 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 - node_modules/mkdirp/package.json | 66 - 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/mocha/CHANGELOG.md | 1816 -- node_modules/mocha/LICENSE | 22 - node_modules/mocha/README.md | 105 - node_modules/mocha/assets/growl/error.png | Bin 412 -> 0 bytes node_modules/mocha/assets/growl/ok.png | Bin 388 -> 0 bytes node_modules/mocha/bin/_mocha | 10 - node_modules/mocha/bin/mocha | 155 - node_modules/mocha/bin/options.js | 10 - node_modules/mocha/browser-entry.js | 191 - node_modules/mocha/index.js | 3 - node_modules/mocha/mocha.css | 325 - node_modules/mocha/mocha.js | 18104 ---------------- .../mocha/node_modules/debug/CHANGELOG.md | 395 - node_modules/mocha/node_modules/debug/LICENSE | 19 - .../mocha/node_modules/debug/README.md | 437 - node_modules/mocha/node_modules/debug/node.js | 1 - .../mocha/node_modules/debug/package.json | 94 - .../mocha/node_modules/debug/src/browser.js | 180 - .../mocha/node_modules/debug/src/common.js | 249 - .../mocha/node_modules/debug/src/index.js | 12 - .../mocha/node_modules/debug/src/node.js | 174 - node_modules/mocha/node_modules/glob/LICENSE | 15 - .../mocha/node_modules/glob/README.md | 368 - .../mocha/node_modules/glob/changelog.md | 67 - .../mocha/node_modules/glob/common.js | 240 - node_modules/mocha/node_modules/glob/glob.js | 790 - .../mocha/node_modules/glob/package.json | 80 - node_modules/mocha/node_modules/glob/sync.js | 486 - node_modules/mocha/node_modules/ms/index.js | 162 - node_modules/mocha/node_modules/ms/license.md | 21 - .../mocha/node_modules/ms/package.json | 74 - node_modules/mocha/node_modules/ms/readme.md | 60 - node_modules/mocha/package.json | 2093 -- 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/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-environment-flags/README.md | 59 - .../node-environment-flags/flags.json | 439 - .../node-environment-flags/implementation.js | 62 - node_modules/node-environment-flags/index.js | 3 - .../node_modules/.bin/semver | 15 - .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 18 - .../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 -- .../node-environment-flags/package.json | 101 - .../node-environment-flags/polyfill.js | 8 - node_modules/node-environment-flags/shim.js | 16 - 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/number-is-nan/index.js | 4 - node_modules/number-is-nan/license | 21 - node_modules/number-is-nan/package.json | 71 - node_modules/number-is-nan/readme.md | 28 - 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 | 123 - node_modules/object-keys/test/index.js | 5 - node_modules/object.assign/.editorconfig | 20 - node_modules/object.assign/.eslintrc | 17 - node_modules/object.assign/CHANGELOG.md | 179 - node_modules/object.assign/LICENSE | 21 - node_modules/object.assign/README.md | 135 - node_modules/object.assign/auto.js | 3 - node_modules/object.assign/hasSymbols.js | 41 - node_modules/object.assign/implementation.js | 41 - node_modules/object.assign/index.js | 17 - node_modules/object.assign/package.json | 116 - node_modules/object.assign/polyfill.js | 51 - node_modules/object.assign/shim.js | 14 - node_modules/object.assign/test.sh | 53 - node_modules/object.assign/test/.eslintrc | 7 - node_modules/object.assign/test/index.js | 17 - node_modules/object.assign/test/native.js | 47 - node_modules/object.assign/test/shimmed.js | 50 - node_modules/object.assign/test/tests.js | 224 - .../.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/once/LICENSE | 15 - node_modules/once/README.md | 79 - node_modules/once/once.js | 42 - node_modules/once/package.json | 74 - node_modules/opn/index.js | 96 - node_modules/opn/license | 9 - node_modules/opn/package.json | 91 - node_modules/opn/readme.md | 88 - node_modules/opn/xdg-open | 1025 - node_modules/os-locale/index.js | 114 - node_modules/os-locale/license | 9 - node_modules/os-locale/package.json | 82 - node_modules/os-locale/readme.md | 71 - node_modules/p-defer/index.js | 11 - node_modules/p-defer/license | 21 - node_modules/p-defer/package.json | 77 - node_modules/p-defer/readme.md | 47 - 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-is-promise/index.d.ts | 23 - node_modules/p-is-promise/index.js | 15 - node_modules/p-is-promise/license | 9 - node_modules/p-is-promise/package.json | 78 - node_modules/p-is-promise/readme.md | 43 - 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 | 87 - 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-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/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 | 80 - 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/.npmignore | 1 - node_modules/path/LICENSE | 18 - node_modules/path/README.md | 15 - node_modules/path/package.json | 55 - node_modules/path/path.js | 628 - node_modules/process/.eslintrc | 21 - node_modules/process/LICENSE | 22 - node_modules/process/README.md | 26 - node_modules/process/browser.js | 184 - node_modules/process/index.js | 2 - node_modules/process/package.json | 62 - node_modules/process/test.js | 199 - 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/python-shell/CHANGELOG.md | 13 - node_modules/python-shell/README.md | 357 - node_modules/python-shell/index.d.ts | 141 - node_modules/python-shell/index.js | 380 - node_modules/python-shell/index.js.map | 1 - node_modules/python-shell/package.json | 71 - 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 | 74 - .../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 | 67 - node_modules/rimraf/LICENSE | 15 - node_modules/rimraf/README.md | 101 - node_modules/rimraf/bin.js | 50 - node_modules/rimraf/package.json | 71 - node_modules/rimraf/rimraf.js | 372 - node_modules/semver/LICENSE | 15 - node_modules/semver/README.md | 388 - node_modules/semver/bin/semver | 143 - node_modules/semver/package.json | 60 - node_modules/semver/range.bnf | 16 - node_modules/semver/semver.js | 1324 -- 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 | 75 - 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/shimmer/.travis.yml | 7 - node_modules/shimmer/LICENSE | 25 - node_modules/shimmer/README.md | 80 - node_modules/shimmer/index.js | 121 - node_modules/shimmer/package.json | 64 - node_modules/shimmer/test/init.tap.js | 48 - node_modules/shimmer/test/massUnwrap.tap.js | 121 - node_modules/shimmer/test/massWrap.tap.js | 174 - node_modules/shimmer/test/unwrap.tap.js | 101 - node_modules/shimmer/test/wrap.tap.js | 148 - 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 | 70 - node_modules/signal-exit/signals.js | 53 - 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 | 62 - node_modules/source-map-support/register.js | 1 - .../source-map-support/source-map-support.js | 567 - node_modules/source-map/CHANGELOG.md | 301 - node_modules/source-map/LICENSE | 28 - node_modules/source-map/README.md | 742 - node_modules/source-map/package.json | 216 - node_modules/source-map/source-map.d.ts | 98 - node_modules/source-map/source-map.js | 8 - 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 - 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/stack-chain/.npmignore | 5 - node_modules/stack-chain/.travis.yml | 7 - node_modules/stack-chain/LICENSE.md | 19 - node_modules/stack-chain/README.md | 159 - node_modules/stack-chain/benchmark.js | 55 - node_modules/stack-chain/format.js | 59 - node_modules/stack-chain/index.js | 16 - node_modules/stack-chain/package.json | 61 - node_modules/stack-chain/stack-chain.js | 198 - node_modules/stack-chain/test/produce.js | 44 - .../test/simple/callSite-function.js | 121 - .../test/simple/callSite-property.js | 61 - .../conflict-format-delayed-circular.js | 86 - .../test/simple/conflict-format-delayed.js | 112 - .../test/simple/conflict-format-existing.js | 50 - .../test/simple/conflict-version-first.js | 8 - .../test/simple/conflict-version-match.js | 10 - .../test/simple/conflict-version-mismatch.js | 13 - .../stack-chain/test/simple/extend.js | 84 - .../stack-chain/test/simple/filter.js | 72 - .../stack-chain/test/simple/format-replace.js | 64 - .../simple/format-tostring-non-generic.js | 19 - .../test/simple/non-extensible-errors.js | 29 - node_modules/stack-chain/test/simple/order.js | 40 - .../stack-chain/test/simple/uglify.js | 12 - node_modules/string-width/index.js | 36 - node_modules/string-width/license | 9 - node_modules/string-width/package.json | 93 - node_modules/string-width/readme.md | 42 - .../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.js | 4 - node_modules/strip-ansi/license | 9 - node_modules/strip-ansi/package.json | 89 - node_modules/strip-ansi/readme.md | 39 - 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/strip-json-comments/index.js | 70 - node_modules/strip-json-comments/license | 21 - node_modules/strip-json-comments/package.json | 78 - node_modules/strip-json-comments/readme.md | 64 - node_modules/supports-color/browser.js | 5 - node_modules/supports-color/index.js | 137 - node_modules/supports-color/license | 9 - node_modules/supports-color/package.json | 89 - node_modules/supports-color/readme.md | 80 - node_modules/ts-node/LICENSE | 21 - node_modules/ts-node/README.md | 237 - .../ts-node/node_modules/diff/CONTRIBUTING.md | 39 - .../ts-node/node_modules/diff/LICENSE | 31 - .../ts-node/node_modules/diff/README.md | 207 - .../ts-node/node_modules/diff/package.json | 108 - .../node_modules/diff/release-notes.md | 261 - .../ts-node/node_modules/diff/runtime.js | 3 - node_modules/ts-node/package.json | 117 - node_modules/ts-node/register/files.js | 3 - node_modules/ts-node/register/index.js | 1 - .../ts-node/register/transpile-only.js | 3 - node_modules/ts-node/register/type-check.js | 3 - node_modules/ts-node/tsconfig.schema.json | 113 - .../ts-node/tsconfig.schemastore-schema.json | 754 - node_modules/typescript/AUTHORS.md | 348 - node_modules/typescript/CODE_OF_CONDUCT.md | 1 - node_modules/typescript/CopyrightNotice.txt | 15 - node_modules/typescript/LICENSE.txt | 55 - node_modules/typescript/README.md | 107 - .../typescript/ThirdPartyNoticeText.txt | 193 - node_modules/typescript/bin/tsc | 2 - node_modules/typescript/bin/tsserver | 2 - .../CHS/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../CHS/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../CHT/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../CHT/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../CSY/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../CSY/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../DEU/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../DEU/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../ESN/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../ESN/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../FRA/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../FRA/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../ITA/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../ITA/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../JPN/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../JPN/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../KOR/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../KOR/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../PLK/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../PLK/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../PTB/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../PTB/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - .../RUS/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../RUS/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 126 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 867 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 180 - .../TRK/Targets/ProjectItemsSchema.xaml.lcl | 33 - .../TRK/Targets/TypeScriptCompile.xaml.lcl | 195 - .../TypeScriptProjectProperties.xaml.lcl | 492 - .../TypeScriptDebugEngine.dll.lcl | 123 - ...Analysis.TypeScript.EditorFeatures.dll.lcl | 864 - .../TypeScriptTasks/TypeScript.Tasks.dll.lcl | 177 - node_modules/typescript/package.json | 165 - node_modules/util/.npmignore | 1 - node_modules/util/.travis.yml | 8 - node_modules/util/.zuul.yml | 10 - node_modules/util/LICENSE | 18 - node_modules/util/README.md | 15 - node_modules/util/package.json | 62 - node_modules/util/support/isBuffer.js | 3 - node_modules/util/support/isBufferBrowser.js | 6 - node_modules/util/test/browser/inspect.js | 41 - node_modules/util/test/browser/is.js | 91 - node_modules/util/test/node/debug.js | 86 - node_modules/util/test/node/format.js | 77 - node_modules/util/test/node/inspect.js | 195 - node_modules/util/test/node/log.js | 58 - node_modules/util/test/node/util.js | 83 - node_modules/util/util.js | 586 - .../vscode-extension-telemetry/LICENSE | 23 - .../vscode-extension-telemetry/README.md | 58 - .../vscode-extension-telemetry/package.json | 62 - .../thirdpartynotices.txt | 30 - node_modules/vscode-test/.editorconfig | 15 - node_modules/vscode-test/.prettierrc | 5 - node_modules/vscode-test/.travis.yml | 23 - node_modules/vscode-test/CHANGELOG.md | 121 - node_modules/vscode-test/LICENSE | 21 - node_modules/vscode-test/README.md | 152 - node_modules/vscode-test/package.json | 65 - 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 | 73 - 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/wide-align/LICENSE | 14 - node_modules/wide-align/README.md | 47 - node_modules/wide-align/align.js | 65 - node_modules/wide-align/package.json | 70 - node_modules/wrap-ansi/index.js | 168 - node_modules/wrap-ansi/license | 21 - .../node_modules/ansi-regex/index.js | 4 - .../wrap-ansi/node_modules/ansi-regex/license | 21 - .../node_modules/ansi-regex/package.json | 112 - .../node_modules/ansi-regex/readme.md | 39 - .../is-fullwidth-code-point/index.js | 46 - .../is-fullwidth-code-point/license | 21 - .../is-fullwidth-code-point/package.json | 81 - .../is-fullwidth-code-point/readme.md | 39 - .../node_modules/string-width/index.js | 37 - .../node_modules/string-width/license | 21 - .../node_modules/string-width/package.json | 92 - .../node_modules/string-width/readme.md | 42 - .../node_modules/strip-ansi/index.js | 6 - .../wrap-ansi/node_modules/strip-ansi/license | 21 - .../node_modules/strip-ansi/package.json | 106 - .../node_modules/strip-ansi/readme.md | 33 - node_modules/wrap-ansi/package.json | 123 - node_modules/wrap-ansi/readme.md | 73 - 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/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 | 72 - node_modules/yargs-parser/CHANGELOG.md | 448 - node_modules/yargs-parser/LICENSE.txt | 14 - node_modules/yargs-parser/README.md | 350 - node_modules/yargs-parser/index.js | 892 - node_modules/yargs-parser/package.json | 84 - node_modules/yargs-unparser/CHANGELOG.md | 27 - node_modules/yargs-unparser/LICENSE | 21 - node_modules/yargs-unparser/README.md | 91 - node_modules/yargs-unparser/index.js | 130 - .../node_modules/get-caller-file/LICENSE.md | 6 - .../node_modules/get-caller-file/README.md | 4 - .../node_modules/get-caller-file/index.js | 20 - .../node_modules/get-caller-file/package.json | 62 - .../require-main-filename/.npmignore | 3 - .../require-main-filename/.travis.yml | 8 - .../require-main-filename/LICENSE.txt | 14 - .../require-main-filename/README.md | 26 - .../require-main-filename/index.js | 18 - .../require-main-filename/package.json | 62 - .../require-main-filename/test.js | 36 - .../node_modules/yargs-parser/CHANGELOG.md | 412 - .../node_modules/yargs-parser/LICENSE.txt | 14 - .../node_modules/yargs-parser/README.md | 351 - .../node_modules/yargs-parser/index.js | 866 - .../node_modules/yargs-parser/package.json | 83 - .../node_modules/yargs/CHANGELOG.md | 1231 -- .../yargs-unparser/node_modules/yargs/LICENSE | 22 - .../node_modules/yargs/README.md | 122 - .../node_modules/yargs/completion.sh.hbs | 28 - .../node_modules/yargs/index.js | 32 - .../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 | 1190 - node_modules/yargs-unparser/package.json | 111 - node_modules/yargs/CHANGELOG.md | 1291 -- node_modules/yargs/LICENSE | 22 - node_modules/yargs/README.md | 122 - node_modules/yargs/completion.sh.hbs | 28 - node_modules/yargs/completion.zsh.hbs | 17 - node_modules/yargs/index.js | 32 - 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 - .../yargs/node_modules/ansi-regex/index.js | 14 - .../yargs/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 89 - .../yargs/node_modules/ansi-regex/readme.md | 87 - .../yargs/node_modules/string-width/index.js | 39 - .../yargs/node_modules/string-width/license | 9 - .../node_modules/string-width/package.json | 92 - .../yargs/node_modules/string-width/readme.md | 45 - .../yargs/node_modules/strip-ansi/index.d.ts | 15 - .../yargs/node_modules/strip-ansi/index.js | 7 - .../yargs/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 90 - .../yargs/node_modules/strip-ansi/readme.md | 61 - node_modules/yargs/package.json | 114 - node_modules/yargs/yargs.js | 1205 - node_modules/yn/index.d.ts | 65 - node_modules/yn/index.js | 33 - node_modules/yn/lenient.js | 105 - node_modules/yn/license | 9 - node_modules/yn/package.json | 78 - node_modules/yn/readme.md | 83 - 2538 files changed, 3 insertions(+), 249229 deletions(-) delete mode 100644 node_modules/.bin/_mocha delete mode 100644 node_modules/.bin/_mocha.cmd delete mode 100644 node_modules/.bin/_mocha.ps1 delete mode 100644 node_modules/.bin/flat delete mode 100644 node_modules/.bin/flat.cmd delete mode 100644 node_modules/.bin/flat.ps1 delete mode 100644 node_modules/.bin/he delete mode 100644 node_modules/.bin/he.cmd delete mode 100644 node_modules/.bin/he.ps1 delete mode 100644 node_modules/.bin/js-yaml delete mode 100644 node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/.bin/js-yaml.ps1 delete mode 100644 node_modules/.bin/mkdirp delete mode 100644 node_modules/.bin/mkdirp.cmd delete mode 100644 node_modules/.bin/mkdirp.ps1 delete mode 100644 node_modules/.bin/mocha delete mode 100644 node_modules/.bin/mocha.cmd delete mode 100644 node_modules/.bin/mocha.ps1 delete mode 100644 node_modules/.bin/rimraf delete mode 100644 node_modules/.bin/rimraf.cmd delete mode 100644 node_modules/.bin/rimraf.ps1 delete mode 100644 node_modules/.bin/semver delete mode 100644 node_modules/.bin/semver.cmd delete mode 100644 node_modules/.bin/semver.ps1 delete mode 100644 node_modules/.bin/ts-node delete mode 100644 node_modules/.bin/ts-node.cmd delete mode 100644 node_modules/.bin/ts-node.ps1 delete mode 100644 node_modules/.bin/ts-script delete mode 100644 node_modules/.bin/ts-script.cmd delete mode 100644 node_modules/.bin/ts-script.ps1 delete mode 100644 node_modules/.bin/tsc delete mode 100644 node_modules/.bin/tsc.cmd delete mode 100644 node_modules/.bin/tsc.ps1 delete mode 100644 node_modules/.bin/tsserver delete mode 100644 node_modules/.bin/tsserver.cmd delete mode 100644 node_modules/.bin/tsserver.ps1 delete mode 100644 node_modules/.bin/which delete mode 100644 node_modules/.bin/which.cmd delete mode 100644 node_modules/.bin/which.ps1 delete mode 100644 node_modules/@types/events/LICENSE delete mode 100644 node_modules/@types/events/README.md delete mode 100644 node_modules/@types/events/index.d.ts delete mode 100644 node_modules/@types/events/package.json delete mode 100644 node_modules/@types/glob/LICENSE delete mode 100644 node_modules/@types/glob/README.md delete mode 100644 node_modules/@types/glob/index.d.ts delete mode 100644 node_modules/@types/glob/package.json delete mode 100644 node_modules/@types/minimatch/LICENSE delete mode 100644 node_modules/@types/minimatch/README.md delete mode 100644 node_modules/@types/minimatch/index.d.ts delete mode 100644 node_modules/@types/minimatch/package.json delete mode 100644 node_modules/@types/mocha/LICENSE delete mode 100644 node_modules/@types/mocha/README.md delete mode 100644 node_modules/@types/mocha/index.d.ts delete mode 100644 node_modules/@types/mocha/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/vscode/LICENSE delete mode 100644 node_modules/@types/vscode/README.md delete mode 100644 node_modules/@types/vscode/index.d.ts delete mode 100644 node_modules/@types/vscode/package.json delete mode 100644 node_modules/agent-base/.travis.yml delete mode 100644 node_modules/agent-base/History.md delete mode 100644 node_modules/agent-base/README.md delete mode 100644 node_modules/agent-base/index.d.ts delete mode 100644 node_modules/agent-base/index.js delete mode 100644 node_modules/agent-base/package.json delete mode 100644 node_modules/agent-base/patch-core.js delete mode 100644 node_modules/agent-base/test/ssl-cert-snakeoil.key delete mode 100644 node_modules/agent-base/test/ssl-cert-snakeoil.pem delete mode 100644 node_modules/agent-base/test/test.js delete mode 100644 node_modules/ansi-colors/LICENSE delete mode 100644 node_modules/ansi-colors/README.md delete mode 100644 node_modules/ansi-colors/index.js delete mode 100644 node_modules/ansi-colors/package.json delete mode 100644 node_modules/ansi-colors/symbols.js delete mode 100644 node_modules/ansi-colors/types/index.d.ts 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/applicationinsights/LICENSE delete mode 100644 node_modules/applicationinsights/README.md delete mode 100644 node_modules/applicationinsights/package.json delete mode 100644 node_modules/arepl-backend/LICENSE delete mode 100644 node_modules/arepl-backend/README.md delete mode 100644 node_modules/arepl-backend/eval.test.js delete mode 100644 node_modules/arepl-backend/eval.test.js.map delete mode 100644 node_modules/arepl-backend/eval.test.ts delete mode 100644 node_modules/arepl-backend/index.js delete mode 100644 node_modules/arepl-backend/index.js.map delete mode 100644 node_modules/arepl-backend/index.ts delete mode 100644 node_modules/arepl-backend/package.json delete mode 100644 node_modules/arepl-backend/python/README.md delete mode 100644 node_modules/arepl-backend/python/arepl_custom_handlers.py delete mode 100644 node_modules/arepl-backend/python/arepl_dump.py delete mode 100644 node_modules/arepl-backend/python/arepl_examples.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/__init__.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/backend.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/compat.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/ext/__init__.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/ext/numpy.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/ext/pandas.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/handlers.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/pickler.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/tags.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/unpickler.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/util.py delete mode 100644 node_modules/arepl-backend/python/arepl_jsonpickle/version.py delete mode 100644 node_modules/arepl-backend/python/arepl_module_logic.py delete mode 100644 node_modules/arepl-backend/python/arepl_overloads.py delete mode 100644 node_modules/arepl-backend/python/arepl_pickler.py delete mode 100644 node_modules/arepl-backend/python/arepl_python_evaluator.py delete mode 100644 node_modules/arepl-backend/python/arepl_saved.py delete mode 100644 node_modules/arepl-backend/python/arepl_settings.py delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/__init__.py delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/_version.py delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/base.py delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/fetch.py delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.2.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.3.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.4.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.5.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.6.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.7.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.8.txt delete mode 100644 node_modules/arepl-backend/python/arepl_stdlib_list/stdlibTest.py delete mode 100644 node_modules/arepl-backend/python/arepl_user_error.py delete mode 100644 node_modules/arepl-backend/python/astunparse/__init__.py delete mode 100644 node_modules/arepl-backend/python/astunparse/__main__.py delete mode 100644 node_modules/arepl-backend/python/astunparse/printer.py delete mode 100644 node_modules/arepl-backend/python/astunparse/unparser.py delete mode 100644 node_modules/arepl-backend/python/blackify.bat delete mode 100644 node_modules/arepl-backend/python/codegen.py delete mode 100644 node_modules/arepl-backend/python/linter_req.txt delete mode 100644 node_modules/arepl-backend/python/requirements.txt delete mode 100644 node_modules/arepl-backend/python/six.py delete mode 100644 node_modules/arepl-backend/python/testDataFiles/README.md delete mode 100644 node_modules/arepl-backend/python/testDataFiles/foo.py delete mode 100644 node_modules/arepl-backend/python/testDataFiles/foo2.py delete mode 100644 node_modules/arepl-backend/python/testDataFiles/importVar.py delete mode 100644 node_modules/arepl-backend/python/testDataFiles/varToImport.py delete mode 100644 node_modules/arepl-backend/python/test_arepl_dump.py delete mode 100644 node_modules/arepl-backend/python/test_handlers.py delete mode 100644 node_modules/arepl-backend/python/test_pickler.py delete mode 100644 node_modules/arepl-backend/python/test_python_evaluator.py delete mode 100644 node_modules/arg/LICENSE.md delete mode 100644 node_modules/arg/README.md delete mode 100644 node_modules/arg/index.d.ts delete mode 100644 node_modules/arg/index.js delete mode 100644 node_modules/arg/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/package.json delete mode 100644 node_modules/async-hook-jl/.eslintrc delete mode 100644 node_modules/async-hook-jl/.npmignore delete mode 100644 node_modules/async-hook-jl/.travis.yml delete mode 100644 node_modules/async-hook-jl/LICENSE.md delete mode 100644 node_modules/async-hook-jl/README.md delete mode 100644 node_modules/async-hook-jl/async-hook.js delete mode 100644 node_modules/async-hook-jl/index.js delete mode 100644 node_modules/async-hook-jl/package.json delete mode 100644 node_modules/async-hook-jl/patches/next-tick.js delete mode 100644 node_modules/async-hook-jl/patches/promise.js delete mode 100644 node_modules/async-hook-jl/patches/timers.js delete mode 100644 node_modules/async-hook-jl/test/runner.js delete mode 100644 node_modules/async-hook-jl/test/test-conflict-match.js delete mode 100644 node_modules/async-hook-jl/test/test-conflict-mismatch.js delete mode 100644 node_modules/async-hook-jl/test/test-fsaccess-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-fsaccess-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-hooks-remove.js delete mode 100644 node_modules/async-hook-jl/test/test-hooks-twice.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-clear-in-callback.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-clear.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-didthrow.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-exception.js delete mode 100644 node_modules/async-hook-jl/test/test-immediate-non-function.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-clear-in-callback.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-clear.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-didthrow.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-exception.js delete mode 100644 node_modules/async-hook-jl/test/test-interval-non-function.js delete mode 100644 node_modules/async-hook-jl/test/test-nexttick-didthrow.js delete mode 100644 node_modules/async-hook-jl/test/test-nexttick-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-nexttick-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-nexttick-exception.js delete mode 100644 node_modules/async-hook-jl/test/test-nexttick-non-function.js delete mode 100644 node_modules/async-hook-jl/test/test-parent.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-catch-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-catch-then-chain-fulfilled-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-then-catch-chain-rejected-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-then-fulfilled-chained-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-then-fulfilled-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-then-fulfilled-multiple-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-then-rejected-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-promise-timing.js delete mode 100644 node_modules/async-hook-jl/test/test-stackfilter-eval.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-clear-in-callback.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-clear.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-didthrow.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-disabled.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-enabled.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-exception.js delete mode 100644 node_modules/async-hook-jl/test/test-timeout-non-function.js delete mode 100644 node_modules/async-hook-jl/yarn.lock delete mode 100644 node_modules/async-listener/.travis.yml delete mode 100644 node_modules/async-listener/LICENSE delete mode 100644 node_modules/async-listener/README.md delete mode 100644 node_modules/async-listener/es6-wrapped-promise.js delete mode 100644 node_modules/async-listener/glue.js delete mode 100644 node_modules/async-listener/index.js delete mode 100644 node_modules/async-listener/package.json delete mode 100644 node_modules/async-listener/test/add-remove.tap.js delete mode 100644 node_modules/async-listener/test/connection-handler-disconnects.tap.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-multiple-handled.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-multiple-mix.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-multiple-unhandled.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-net.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-throw-in-after.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-throw-in-before-multiple.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-throw-in-before.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error-throw-in-error.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-error.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-nexttick-remove.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-only-add.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-remove-before.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-remove-inflight-error.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener-remove-inflight.simple.js delete mode 100644 node_modules/async-listener/test/core-asynclistener.simple.js delete mode 100644 node_modules/async-listener/test/core/core-asynclistener-add-inflight.js delete mode 100644 node_modules/async-listener/test/core/core-asynclistener-error-throw-in-before-inflight.js delete mode 100644 node_modules/async-listener/test/errors-this-tick.tap.js delete mode 100644 node_modules/async-listener/test/fork-listen2-problem.tap.js delete mode 100644 node_modules/async-listener/test/fork-listener.js delete mode 100644 node_modules/async-listener/test/function-length-preserved.tap.js delete mode 100644 node_modules/async-listener/test/handle.tap.js delete mode 100644 node_modules/async-listener/test/http-request.tap.js delete mode 100644 node_modules/async-listener/test/native-promises.tap.js delete mode 100644 node_modules/async-listener/test/no-after-following-error.tap.js delete mode 100644 node_modules/async-listener/test/overlapping-nexttick.tap.js delete mode 100644 node_modules/async-listener/test/promise-subclass.js delete mode 100644 node_modules/async-listener/test/simple-counter-with-io.tap.js delete mode 100644 node_modules/async-listener/test/simple-counter.tap.js delete mode 100644 node_modules/async-listener/test/simplified-error.simple.js delete mode 100644 node_modules/async-listener/test/spawn.tap.js delete mode 100644 node_modules/async-listener/test/timers.tap.js delete mode 100644 node_modules/async-listener/test/zlib.tap.js 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/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/browser-stdout/LICENSE delete mode 100644 node_modules/browser-stdout/README.md delete mode 100644 node_modules/browser-stdout/index.js delete mode 100644 node_modules/browser-stdout/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/callsite/.npmignore delete mode 100644 node_modules/callsite/History.md delete mode 100644 node_modules/callsite/Makefile delete mode 100644 node_modules/callsite/Readme.md delete mode 100644 node_modules/callsite/index.js delete mode 100644 node_modules/callsite/package.json 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/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/node_modules/supports-color/browser.js delete mode 100644 node_modules/chalk/node_modules/supports-color/index.js delete mode 100644 node_modules/chalk/node_modules/supports-color/license delete mode 100644 node_modules/chalk/node_modules/supports-color/package.json delete mode 100644 node_modules/chalk/node_modules/supports-color/readme.md 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/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/cls-hooked/CHANGELOG.md delete mode 100644 node_modules/cls-hooked/LICENSE delete mode 100644 node_modules/cls-hooked/README.md delete mode 100644 node_modules/cls-hooked/context-legacy.js delete mode 100644 node_modules/cls-hooked/context.js delete mode 100644 node_modules/cls-hooked/index.js delete mode 100644 node_modules/cls-hooked/package.json delete mode 100644 node_modules/code-point-at/index.js delete mode 100644 node_modules/code-point-at/license delete mode 100644 node_modules/code-point-at/package.json delete mode 100644 node_modules/code-point-at/readme.md 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/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/continuation-local-storage/.eslintrc delete mode 100644 node_modules/continuation-local-storage/.travis.yml delete mode 100644 node_modules/continuation-local-storage/CHANGELOG.md delete mode 100644 node_modules/continuation-local-storage/LICENSE delete mode 100644 node_modules/continuation-local-storage/README.md delete mode 100644 node_modules/continuation-local-storage/context.js delete mode 100644 node_modules/continuation-local-storage/package.json delete mode 100644 node_modules/continuation-local-storage/test/async-context.tap.js delete mode 100644 node_modules/continuation-local-storage/test/async-no-run-queue-multiple.tap.js delete mode 100644 node_modules/continuation-local-storage/test/bind-emitter.tap.js delete mode 100644 node_modules/continuation-local-storage/test/bind.tap.js delete mode 100644 node_modules/continuation-local-storage/test/crypto.tap.js delete mode 100644 node_modules/continuation-local-storage/test/dns.tap.js delete mode 100644 node_modules/continuation-local-storage/test/error-handling.tap.js delete mode 100644 node_modules/continuation-local-storage/test/fs.tap.js delete mode 100644 node_modules/continuation-local-storage/test/interleave-contexts.tap.js delete mode 100644 node_modules/continuation-local-storage/test/monkeypatching.tap.js delete mode 100644 node_modules/continuation-local-storage/test/namespaces.tap.js delete mode 100644 node_modules/continuation-local-storage/test/nesting.tap.js delete mode 100644 node_modules/continuation-local-storage/test/net-events.tap.js delete mode 100644 node_modules/continuation-local-storage/test/promises.tap.js delete mode 100644 node_modules/continuation-local-storage/test/proper-exit.tap.js delete mode 100644 node_modules/continuation-local-storage/test/run-and-return.tap.js delete mode 100644 node_modules/continuation-local-storage/test/simple.tap.js delete mode 100644 node_modules/continuation-local-storage/test/timers.tap.js delete mode 100644 node_modules/continuation-local-storage/test/tracer-scenarios.tap.js delete mode 100644 node_modules/continuation-local-storage/test/zlib.tap.js 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/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/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/node.js delete mode 100644 node_modules/decache/.travis.yml delete mode 100644 node_modules/decache/README.md delete mode 100644 node_modules/decache/decache.d.ts delete mode 100644 node_modules/decache/decache.js delete mode 100644 node_modules/decache/package.json delete mode 100644 node_modules/decache/setup.js delete mode 100644 node_modules/decache/test/test.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/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/diagnostic-channel-publishers/LICENSE delete mode 100644 node_modules/diagnostic-channel-publishers/README.md delete mode 100644 node_modules/diagnostic-channel-publishers/package.json delete mode 100644 node_modules/diagnostic-channel/LICENSE delete mode 100644 node_modules/diagnostic-channel/README.md delete mode 100644 node_modules/diagnostic-channel/package.json delete mode 100644 node_modules/diff/CONTRIBUTING.md delete mode 100644 node_modules/diff/LICENSE delete mode 100644 node_modules/diff/README.md delete mode 100644 node_modules/diff/package.json delete mode 100644 node_modules/diff/release-notes.md delete mode 100644 node_modules/diff/runtime.js delete mode 100644 node_modules/diff/yarn.lock delete mode 100644 node_modules/emitter-listener/.travis.yml delete mode 100644 node_modules/emitter-listener/README.md delete mode 100644 node_modules/emitter-listener/listener.js delete mode 100644 node_modules/emitter-listener/package.json delete mode 100644 node_modules/emitter-listener/test/basic.tap.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/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/es6-promise/CHANGELOG.md delete mode 100644 node_modules/es6-promise/LICENSE delete mode 100644 node_modules/es6-promise/README.md delete mode 100644 node_modules/es6-promise/auto.js delete mode 100644 node_modules/es6-promise/es6-promise.d.ts delete mode 100644 node_modules/es6-promise/package.json delete mode 100644 node_modules/es6-promisify/README.md delete mode 100644 node_modules/es6-promisify/package.json 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/execa/index.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/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/flat/.travis.yml delete mode 100644 node_modules/flat/LICENSE delete mode 100644 node_modules/flat/README.md delete mode 100644 node_modules/flat/cli.js delete mode 100644 node_modules/flat/index.js delete mode 100644 node_modules/flat/package.json delete mode 100644 node_modules/flat/test/test.js 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-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/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/growl/.eslintrc.json delete mode 100644 node_modules/growl/.tags delete mode 100644 node_modules/growl/.tags1 delete mode 100644 node_modules/growl/.travis.yml delete mode 100644 node_modules/growl/History.md delete mode 100644 node_modules/growl/Readme.md delete mode 100644 node_modules/growl/package.json delete mode 100644 node_modules/growl/test.js 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/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/he/LICENSE-MIT.txt delete mode 100644 node_modules/he/README.md delete mode 100644 node_modules/he/bin/he delete mode 100644 node_modules/he/he.js delete mode 100644 node_modules/he/man/he.1 delete mode 100644 node_modules/he/package.json delete mode 100644 node_modules/http-proxy-agent/.travis.yml delete mode 100644 node_modules/http-proxy-agent/History.md delete mode 100644 node_modules/http-proxy-agent/README.md delete mode 100644 node_modules/http-proxy-agent/index.js delete mode 100644 node_modules/http-proxy-agent/package.json delete mode 100644 node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key delete mode 100644 node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem delete mode 100644 node_modules/http-proxy-agent/test/test.js delete mode 100644 node_modules/https-proxy-agent/.editorconfig delete mode 100644 node_modules/https-proxy-agent/.eslintrc.js delete mode 100644 node_modules/https-proxy-agent/History.md delete mode 100644 node_modules/https-proxy-agent/README.md delete mode 100644 node_modules/https-proxy-agent/index.d.ts delete mode 100644 node_modules/https-proxy-agent/index.js delete mode 100644 node_modules/https-proxy-agent/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/inherits/test.js delete mode 100644 node_modules/invert-kv/index.js delete mode 100644 node_modules/invert-kv/license delete mode 100644 node_modules/invert-kv/package.json delete mode 100644 node_modules/invert-kv/readme.md 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-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-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-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-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-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/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/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/index.js delete mode 100644 node_modules/js-yaml/node_modules/.bin/esparse delete mode 100644 node_modules/js-yaml/node_modules/.bin/esparse.cmd delete mode 100644 node_modules/js-yaml/node_modules/.bin/esparse.ps1 delete mode 100644 node_modules/js-yaml/node_modules/.bin/esvalidate delete mode 100644 node_modules/js-yaml/node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/js-yaml/node_modules/.bin/esvalidate.ps1 delete mode 100644 node_modules/js-yaml/node_modules/esprima/ChangeLog delete mode 100644 node_modules/js-yaml/node_modules/esprima/LICENSE.BSD delete mode 100644 node_modules/js-yaml/node_modules/esprima/README.md delete mode 100644 node_modules/js-yaml/node_modules/esprima/bin/esparse.js delete mode 100644 node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js delete mode 100644 node_modules/js-yaml/node_modules/esprima/package.json delete mode 100644 node_modules/js-yaml/package.json delete mode 100644 node_modules/lcid/index.js delete mode 100644 node_modules/lcid/lcid.json delete mode 100644 node_modules/lcid/license delete mode 100644 node_modules/lcid/package.json delete mode 100644 node_modules/lcid/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/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/log-symbols/browser.js delete mode 100644 node_modules/log-symbols/index.js delete mode 100644 node_modules/log-symbols/license delete mode 100644 node_modules/log-symbols/package.json delete mode 100644 node_modules/log-symbols/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/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/map-age-cleaner/license delete mode 100644 node_modules/map-age-cleaner/package.json delete mode 100644 node_modules/map-age-cleaner/readme.md delete mode 100644 node_modules/mem/index.d.ts delete mode 100644 node_modules/mem/index.js delete mode 100644 node_modules/mem/license delete mode 100644 node_modules/mem/package.json delete mode 100644 node_modules/mem/readme.md delete mode 100644 node_modules/mimic-fn/index.d.ts delete mode 100644 node_modules/mimic-fn/index.js delete mode 100644 node_modules/mimic-fn/license delete mode 100644 node_modules/mimic-fn/package.json delete mode 100644 node_modules/mimic-fn/readme.md 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/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/long.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/whitespace.js 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/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/mocha/CHANGELOG.md delete mode 100644 node_modules/mocha/LICENSE delete mode 100644 node_modules/mocha/README.md delete mode 100644 node_modules/mocha/assets/growl/error.png delete mode 100644 node_modules/mocha/assets/growl/ok.png delete mode 100644 node_modules/mocha/bin/_mocha delete mode 100644 node_modules/mocha/bin/mocha delete mode 100644 node_modules/mocha/bin/options.js delete mode 100644 node_modules/mocha/browser-entry.js delete mode 100644 node_modules/mocha/index.js delete mode 100644 node_modules/mocha/mocha.css delete mode 100644 node_modules/mocha/mocha.js delete mode 100644 node_modules/mocha/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/mocha/node_modules/debug/LICENSE delete mode 100644 node_modules/mocha/node_modules/debug/README.md delete mode 100644 node_modules/mocha/node_modules/debug/node.js delete mode 100644 node_modules/mocha/node_modules/debug/package.json delete mode 100644 node_modules/mocha/node_modules/debug/src/browser.js delete mode 100644 node_modules/mocha/node_modules/debug/src/common.js delete mode 100644 node_modules/mocha/node_modules/debug/src/index.js delete mode 100644 node_modules/mocha/node_modules/debug/src/node.js delete mode 100644 node_modules/mocha/node_modules/glob/LICENSE delete mode 100644 node_modules/mocha/node_modules/glob/README.md delete mode 100644 node_modules/mocha/node_modules/glob/changelog.md delete mode 100644 node_modules/mocha/node_modules/glob/common.js delete mode 100644 node_modules/mocha/node_modules/glob/glob.js delete mode 100644 node_modules/mocha/node_modules/glob/package.json delete mode 100644 node_modules/mocha/node_modules/glob/sync.js delete mode 100644 node_modules/mocha/node_modules/ms/index.js delete mode 100644 node_modules/mocha/node_modules/ms/license.md delete mode 100644 node_modules/mocha/node_modules/ms/package.json delete mode 100644 node_modules/mocha/node_modules/ms/readme.md delete mode 100644 node_modules/mocha/package.json 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/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-environment-flags/README.md delete mode 100644 node_modules/node-environment-flags/flags.json delete mode 100644 node_modules/node-environment-flags/implementation.js delete mode 100644 node_modules/node-environment-flags/index.js delete mode 100644 node_modules/node-environment-flags/node_modules/.bin/semver delete mode 100644 node_modules/node-environment-flags/node_modules/.bin/semver.cmd delete mode 100644 node_modules/node-environment-flags/node_modules/.bin/semver.ps1 delete mode 100644 node_modules/node-environment-flags/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/node-environment-flags/node_modules/semver/LICENSE delete mode 100644 node_modules/node-environment-flags/node_modules/semver/README.md delete mode 100644 node_modules/node-environment-flags/node_modules/semver/bin/semver delete mode 100644 node_modules/node-environment-flags/node_modules/semver/package.json delete mode 100644 node_modules/node-environment-flags/node_modules/semver/range.bnf delete mode 100644 node_modules/node-environment-flags/node_modules/semver/semver.js delete mode 100644 node_modules/node-environment-flags/package.json delete mode 100644 node_modules/node-environment-flags/polyfill.js delete mode 100644 node_modules/node-environment-flags/shim.js 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/number-is-nan/index.js delete mode 100644 node_modules/number-is-nan/license delete mode 100644 node_modules/number-is-nan/package.json delete mode 100644 node_modules/number-is-nan/readme.md 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.assign/.editorconfig delete mode 100644 node_modules/object.assign/.eslintrc delete mode 100644 node_modules/object.assign/CHANGELOG.md delete mode 100644 node_modules/object.assign/LICENSE delete mode 100644 node_modules/object.assign/README.md delete mode 100644 node_modules/object.assign/auto.js delete mode 100644 node_modules/object.assign/hasSymbols.js delete mode 100644 node_modules/object.assign/implementation.js delete mode 100644 node_modules/object.assign/index.js delete mode 100644 node_modules/object.assign/package.json delete mode 100644 node_modules/object.assign/polyfill.js delete mode 100644 node_modules/object.assign/shim.js delete mode 100644 node_modules/object.assign/test.sh delete mode 100644 node_modules/object.assign/test/.eslintrc delete mode 100644 node_modules/object.assign/test/index.js delete mode 100644 node_modules/object.assign/test/native.js delete mode 100644 node_modules/object.assign/test/shimmed.js delete mode 100644 node_modules/object.assign/test/tests.js 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/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/opn/index.js delete mode 100644 node_modules/opn/license delete mode 100644 node_modules/opn/package.json delete mode 100644 node_modules/opn/readme.md delete mode 100644 node_modules/opn/xdg-open delete mode 100644 node_modules/os-locale/index.js delete mode 100644 node_modules/os-locale/license delete mode 100644 node_modules/os-locale/package.json delete mode 100644 node_modules/os-locale/readme.md delete mode 100644 node_modules/p-defer/index.js delete mode 100644 node_modules/p-defer/license delete mode 100644 node_modules/p-defer/package.json delete mode 100644 node_modules/p-defer/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-is-promise/index.d.ts delete mode 100644 node_modules/p-is-promise/index.js delete mode 100644 node_modules/p-is-promise/license delete mode 100644 node_modules/p-is-promise/package.json delete mode 100644 node_modules/p-is-promise/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-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/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/.npmignore delete mode 100644 node_modules/path/LICENSE delete mode 100644 node_modules/path/README.md delete mode 100644 node_modules/path/package.json delete mode 100644 node_modules/path/path.js delete mode 100644 node_modules/process/.eslintrc delete mode 100644 node_modules/process/LICENSE delete mode 100644 node_modules/process/README.md delete mode 100644 node_modules/process/browser.js delete mode 100644 node_modules/process/index.js delete mode 100644 node_modules/process/package.json delete mode 100644 node_modules/process/test.js 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/python-shell/CHANGELOG.md delete mode 100644 node_modules/python-shell/README.md delete mode 100644 node_modules/python-shell/index.d.ts delete mode 100644 node_modules/python-shell/index.js delete mode 100644 node_modules/python-shell/index.js.map delete mode 100644 node_modules/python-shell/package.json 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/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/semver/LICENSE delete mode 100644 node_modules/semver/README.md delete mode 100644 node_modules/semver/bin/semver delete mode 100644 node_modules/semver/package.json delete mode 100644 node_modules/semver/range.bnf delete mode 100644 node_modules/semver/semver.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/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/shimmer/.travis.yml delete mode 100644 node_modules/shimmer/LICENSE delete mode 100644 node_modules/shimmer/README.md delete mode 100644 node_modules/shimmer/index.js delete mode 100644 node_modules/shimmer/package.json delete mode 100644 node_modules/shimmer/test/init.tap.js delete mode 100644 node_modules/shimmer/test/massUnwrap.tap.js delete mode 100644 node_modules/shimmer/test/massWrap.tap.js delete mode 100644 node_modules/shimmer/test/unwrap.tap.js delete mode 100644 node_modules/shimmer/test/wrap.tap.js 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/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/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/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/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/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/stack-chain/.npmignore delete mode 100644 node_modules/stack-chain/.travis.yml delete mode 100644 node_modules/stack-chain/LICENSE.md delete mode 100644 node_modules/stack-chain/README.md delete mode 100644 node_modules/stack-chain/benchmark.js delete mode 100644 node_modules/stack-chain/format.js delete mode 100644 node_modules/stack-chain/index.js delete mode 100644 node_modules/stack-chain/package.json delete mode 100644 node_modules/stack-chain/stack-chain.js delete mode 100644 node_modules/stack-chain/test/produce.js delete mode 100644 node_modules/stack-chain/test/simple/callSite-function.js delete mode 100644 node_modules/stack-chain/test/simple/callSite-property.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-format-delayed-circular.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-format-delayed.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-format-existing.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-version-first.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-version-match.js delete mode 100644 node_modules/stack-chain/test/simple/conflict-version-mismatch.js delete mode 100644 node_modules/stack-chain/test/simple/extend.js delete mode 100644 node_modules/stack-chain/test/simple/filter.js delete mode 100644 node_modules/stack-chain/test/simple/format-replace.js delete mode 100644 node_modules/stack-chain/test/simple/format-tostring-non-generic.js delete mode 100644 node_modules/stack-chain/test/simple/non-extensible-errors.js delete mode 100644 node_modules/stack-chain/test/simple/order.js delete mode 100644 node_modules/stack-chain/test/simple/uglify.js 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.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-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/strip-json-comments/index.js delete mode 100644 node_modules/strip-json-comments/license delete mode 100644 node_modules/strip-json-comments/package.json delete mode 100644 node_modules/strip-json-comments/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/ts-node/LICENSE delete mode 100644 node_modules/ts-node/README.md delete mode 100644 node_modules/ts-node/node_modules/diff/CONTRIBUTING.md delete mode 100644 node_modules/ts-node/node_modules/diff/LICENSE delete mode 100644 node_modules/ts-node/node_modules/diff/README.md delete mode 100644 node_modules/ts-node/node_modules/diff/package.json delete mode 100644 node_modules/ts-node/node_modules/diff/release-notes.md delete mode 100644 node_modules/ts-node/node_modules/diff/runtime.js delete mode 100644 node_modules/ts-node/package.json delete mode 100644 node_modules/ts-node/register/files.js delete mode 100644 node_modules/ts-node/register/index.js delete mode 100644 node_modules/ts-node/register/transpile-only.js delete mode 100644 node_modules/ts-node/register/type-check.js delete mode 100644 node_modules/ts-node/tsconfig.schema.json delete mode 100644 node_modules/ts-node/tsconfig.schemastore-schema.json delete mode 100644 node_modules/typescript/AUTHORS.md delete mode 100644 node_modules/typescript/CODE_OF_CONDUCT.md delete mode 100644 node_modules/typescript/CopyrightNotice.txt delete mode 100644 node_modules/typescript/LICENSE.txt delete mode 100644 node_modules/typescript/README.md delete mode 100644 node_modules/typescript/ThirdPartyNoticeText.txt delete mode 100644 node_modules/typescript/bin/tsc delete mode 100644 node_modules/typescript/bin/tsserver delete mode 100644 node_modules/typescript/loc/lcl/CHS/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHS/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CHT/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/CSY/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/DEU/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ESN/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/FRA/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/ITA/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/JPN/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/KOR/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PLK/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/PTB/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/RUS/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/Targets/ProjectItemsSchema.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptCompile.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptProjectProperties.xaml.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl delete mode 100644 node_modules/typescript/loc/lcl/TRK/TypeScriptTasks/TypeScript.Tasks.dll.lcl delete mode 100644 node_modules/typescript/package.json delete mode 100644 node_modules/util/.npmignore delete mode 100644 node_modules/util/.travis.yml delete mode 100644 node_modules/util/.zuul.yml delete mode 100644 node_modules/util/LICENSE delete mode 100644 node_modules/util/README.md delete mode 100644 node_modules/util/package.json delete mode 100644 node_modules/util/support/isBuffer.js delete mode 100644 node_modules/util/support/isBufferBrowser.js delete mode 100644 node_modules/util/test/browser/inspect.js delete mode 100644 node_modules/util/test/browser/is.js delete mode 100644 node_modules/util/test/node/debug.js delete mode 100644 node_modules/util/test/node/format.js delete mode 100644 node_modules/util/test/node/inspect.js delete mode 100644 node_modules/util/test/node/log.js delete mode 100644 node_modules/util/test/node/util.js delete mode 100644 node_modules/util/util.js delete mode 100644 node_modules/vscode-extension-telemetry/LICENSE delete mode 100644 node_modules/vscode-extension-telemetry/README.md delete mode 100644 node_modules/vscode-extension-telemetry/package.json delete mode 100644 node_modules/vscode-extension-telemetry/thirdpartynotices.txt delete mode 100644 node_modules/vscode-test/.editorconfig delete mode 100644 node_modules/vscode-test/.prettierrc delete mode 100644 node_modules/vscode-test/.travis.yml delete mode 100644 node_modules/vscode-test/CHANGELOG.md delete mode 100644 node_modules/vscode-test/LICENSE delete mode 100644 node_modules/vscode-test/README.md delete mode 100644 node_modules/vscode-test/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/wide-align/LICENSE delete mode 100644 node_modules/wide-align/README.md delete mode 100644 node_modules/wide-align/align.js delete mode 100644 node_modules/wide-align/package.json delete mode 100644 node_modules/wrap-ansi/index.js delete mode 100644 node_modules/wrap-ansi/license delete mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/index.js delete mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/license delete mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/package.json delete mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js delete mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license delete mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json delete mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md delete mode 100644 node_modules/wrap-ansi/node_modules/string-width/index.js delete mode 100644 node_modules/wrap-ansi/node_modules/string-width/license delete mode 100644 node_modules/wrap-ansi/node_modules/string-width/package.json delete mode 100644 node_modules/wrap-ansi/node_modules/string-width/readme.md delete mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/index.js delete mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/license delete mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/package.json delete mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/readme.md 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/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/package.json delete mode 100644 node_modules/yargs-unparser/CHANGELOG.md delete mode 100644 node_modules/yargs-unparser/LICENSE delete mode 100644 node_modules/yargs-unparser/README.md delete mode 100644 node_modules/yargs-unparser/index.js delete mode 100644 node_modules/yargs-unparser/node_modules/get-caller-file/LICENSE.md delete mode 100644 node_modules/yargs-unparser/node_modules/get-caller-file/README.md delete mode 100644 node_modules/yargs-unparser/node_modules/get-caller-file/index.js delete mode 100644 node_modules/yargs-unparser/node_modules/get-caller-file/package.json delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/.npmignore delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/.travis.yml delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/LICENSE.txt delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/README.md delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/index.js delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/package.json delete mode 100644 node_modules/yargs-unparser/node_modules/require-main-filename/test.js delete mode 100644 node_modules/yargs-unparser/node_modules/yargs-parser/CHANGELOG.md delete mode 100644 node_modules/yargs-unparser/node_modules/yargs-parser/LICENSE.txt delete mode 100644 node_modules/yargs-unparser/node_modules/yargs-parser/README.md delete mode 100644 node_modules/yargs-unparser/node_modules/yargs-parser/index.js delete mode 100644 node_modules/yargs-unparser/node_modules/yargs-parser/package.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/CHANGELOG.md delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/LICENSE delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/README.md delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/completion.sh.hbs delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/index.js delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/be.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/de.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/en.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/es.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/fr.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/hi.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/hu.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/id.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/it.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/ja.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/ko.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/nb.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/nl.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/nn.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/pirate.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/pl.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/pt.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/pt_BR.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/ru.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/th.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/tr.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/zh_CN.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/locales/zh_TW.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/package.json delete mode 100644 node_modules/yargs-unparser/node_modules/yargs/yargs.js delete mode 100644 node_modules/yargs-unparser/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/completion.sh.hbs delete mode 100644 node_modules/yargs/completion.zsh.hbs delete mode 100644 node_modules/yargs/index.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/node_modules/ansi-regex/index.js delete mode 100644 node_modules/yargs/node_modules/ansi-regex/license delete mode 100644 node_modules/yargs/node_modules/ansi-regex/package.json delete mode 100644 node_modules/yargs/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/yargs/node_modules/string-width/index.js delete mode 100644 node_modules/yargs/node_modules/string-width/license delete mode 100644 node_modules/yargs/node_modules/string-width/package.json delete mode 100644 node_modules/yargs/node_modules/string-width/readme.md delete mode 100644 node_modules/yargs/node_modules/strip-ansi/index.d.ts delete mode 100644 node_modules/yargs/node_modules/strip-ansi/index.js delete mode 100644 node_modules/yargs/node_modules/strip-ansi/license delete mode 100644 node_modules/yargs/node_modules/strip-ansi/package.json delete mode 100644 node_modules/yargs/node_modules/strip-ansi/readme.md delete mode 100644 node_modules/yargs/package.json delete mode 100644 node_modules/yargs/yargs.js delete mode 100644 node_modules/yn/index.d.ts delete mode 100644 node_modules/yn/index.js delete mode 100644 node_modules/yn/lenient.js delete mode 100644 node_modules/yn/license delete mode 100644 node_modules/yn/package.json delete mode 100644 node_modules/yn/readme.md diff --git a/.gitignore b/.gitignore index bd4b882..2fa5ff4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ coverage .nyc_output .idea +# Node.js +node_modules/ + ################################ ## Standard Python Gitignore ################################ diff --git a/node_modules/.bin/_mocha b/node_modules/.bin/_mocha deleted file mode 100644 index 6fd9664..0000000 --- a/node_modules/.bin/_mocha +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../mocha/bin/_mocha" "$@" - ret=$? -else - node "$basedir/../mocha/bin/_mocha" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/_mocha.cmd b/node_modules/.bin/_mocha.cmd deleted file mode 100644 index 704d7af..0000000 --- a/node_modules/.bin/_mocha.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\mocha\bin\_mocha" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/_mocha.ps1 b/node_modules/.bin/_mocha.ps1 deleted file mode 100644 index 303d5ea..0000000 --- a/node_modules/.bin/_mocha.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../mocha/bin/_mocha" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../mocha/bin/_mocha" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/flat b/node_modules/.bin/flat deleted file mode 100644 index d235226..0000000 --- a/node_modules/.bin/flat +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../flat/cli.js" "$@" - ret=$? -else - node "$basedir/../flat/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/flat.cmd b/node_modules/.bin/flat.cmd deleted file mode 100644 index 8cb55ca..0000000 --- a/node_modules/.bin/flat.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\flat\cli.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/flat.ps1 b/node_modules/.bin/flat.ps1 deleted file mode 100644 index d399e02..0000000 --- a/node_modules/.bin/flat.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../flat/cli.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../flat/cli.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/he b/node_modules/.bin/he deleted file mode 100644 index 6837070..0000000 --- a/node_modules/.bin/he +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../he/bin/he" "$@" - ret=$? -else - node "$basedir/../he/bin/he" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/he.cmd b/node_modules/.bin/he.cmd deleted file mode 100644 index efc7fc8..0000000 --- a/node_modules/.bin/he.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\he\bin\he" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/he.ps1 b/node_modules/.bin/he.ps1 deleted file mode 100644 index 4f94281..0000000 --- a/node_modules/.bin/he.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../he/bin/he" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../he/bin/he" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml deleted file mode 100644 index 4537030..0000000 --- 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*|*MINGW*|*MSYS*) 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 9597bdf..0000000 --- a/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/js-yaml.ps1 b/node_modules/.bin/js-yaml.ps1 deleted file mode 100644 index 728b322..0000000 --- a/node_modules/.bin/js-yaml.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 100644 index bcd333f..0000000 --- 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*|*MINGW*|*MSYS*) 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 c2c9350..0000000 --- a/node_modules/.bin/mkdirp.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/mkdirp.ps1 b/node_modules/.bin/mkdirp.ps1 deleted file mode 100644 index 35ce690..0000000 --- a/node_modules/.bin/mkdirp.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mocha b/node_modules/.bin/mocha deleted file mode 100644 index 55ed62a..0000000 --- a/node_modules/.bin/mocha +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../mocha/bin/mocha" "$@" - ret=$? -else - node "$basedir/../mocha/bin/mocha" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/mocha.cmd b/node_modules/.bin/mocha.cmd deleted file mode 100644 index a305451..0000000 --- a/node_modules/.bin/mocha.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\mocha\bin\mocha" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/mocha.ps1 b/node_modules/.bin/mocha.ps1 deleted file mode 100644 index 21a7587..0000000 --- a/node_modules/.bin/mocha.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../mocha/bin/mocha" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../mocha/bin/mocha" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf deleted file mode 100644 index a3e9f71..0000000 --- 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*|*MINGW*|*MSYS*) 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 698f4ba..0000000 --- a/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\rimraf\bin.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/rimraf.ps1 b/node_modules/.bin/rimraf.ps1 deleted file mode 100644 index a244a80..0000000 --- a/node_modules/.bin/rimraf.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../rimraf/bin.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 100644 index 10497aa..0000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) 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/.bin/semver.cmd b/node_modules/.bin/semver.cmd deleted file mode 100644 index eb3aaa1..0000000 --- a/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\semver\bin\semver" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 deleted file mode 100644 index a3315ff..0000000 --- a/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../semver/bin/semver" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node b/node_modules/.bin/ts-node deleted file mode 100644 index 92d9ba2..0000000 --- a/node_modules/.bin/ts-node +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../ts-node/dist/bin.js" "$@" - ret=$? -else - node "$basedir/../ts-node/dist/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/ts-node.cmd b/node_modules/.bin/ts-node.cmd deleted file mode 100644 index d9aa6fe..0000000 --- a/node_modules/.bin/ts-node.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\ts-node\dist\bin.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/ts-node.ps1 b/node_modules/.bin/ts-node.ps1 deleted file mode 100644 index 3f65a9e..0000000 --- a/node_modules/.bin/ts-node.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../ts-node/dist/bin.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-script b/node_modules/.bin/ts-script deleted file mode 100644 index ac523dd..0000000 --- a/node_modules/.bin/ts-script +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../ts-node/dist/script.js" "$@" - ret=$? -else - node "$basedir/../ts-node/dist/script.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/ts-script.cmd b/node_modules/.bin/ts-script.cmd deleted file mode 100644 index 98db675..0000000 --- a/node_modules/.bin/ts-script.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\ts-node\dist\script.js" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/ts-script.ps1 b/node_modules/.bin/ts-script.ps1 deleted file mode 100644 index c36e564..0000000 --- a/node_modules/.bin/ts-script.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../ts-node/dist/script.js" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../ts-node/dist/script.js" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc deleted file mode 100644 index 8331d66..0000000 --- a/node_modules/.bin/tsc +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" - ret=$? -else - node "$basedir/../typescript/bin/tsc" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/tsc.cmd b/node_modules/.bin/tsc.cmd deleted file mode 100644 index d83ffef..0000000 --- a/node_modules/.bin/tsc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\typescript\bin\tsc" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/tsc.ps1 b/node_modules/.bin/tsc.ps1 deleted file mode 100644 index 2cca02f..0000000 --- a/node_modules/.bin/tsc.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../typescript/bin/tsc" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver deleted file mode 100644 index 0f6f2c6..0000000 --- a/node_modules/.bin/tsserver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" - ret=$? -else - node "$basedir/../typescript/bin/tsserver" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/tsserver.cmd b/node_modules/.bin/tsserver.cmd deleted file mode 100644 index 2dcace2..0000000 --- a/node_modules/.bin/tsserver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\typescript\bin\tsserver" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/tsserver.ps1 b/node_modules/.bin/tsserver.ps1 deleted file mode 100644 index 4471fac..0000000 --- a/node_modules/.bin/tsserver.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../typescript/bin/tsserver" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/which b/node_modules/.bin/which deleted file mode 100644 index 12cde79..0000000 --- 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*|*MINGW*|*MSYS*) 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 0664965..0000000 --- a/node_modules/.bin/which.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -"%_prog%" "%dp0%\..\which\bin\which" %* -ENDLOCAL -EXIT /b %errorlevel% -:find_dp0 -SET dp0=%~dp0 -EXIT /b diff --git a/node_modules/.bin/which.ps1 b/node_modules/.bin/which.ps1 deleted file mode 100644 index d023170..0000000 --- a/node_modules/.bin/which.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - & "$basedir/node$exe" "$basedir/../which/bin/which" $args - $ret=$LASTEXITCODE -} else { - & "node$exe" "$basedir/../which/bin/which" $args - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@types/events/LICENSE b/node_modules/@types/events/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/node_modules/@types/events/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/events/README.md b/node_modules/@types/events/README.md deleted file mode 100644 index e459064..0000000 --- a/node_modules/@types/events/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/events` - -# Summary -This package contains type definitions for events (https://github.com/Gozala/events). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/events - -Additional Details - * Last updated: Thu, 24 Jan 2019 03:19:08 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Yasunori Ohoka , Shenwei Wang . diff --git a/node_modules/@types/events/index.d.ts b/node_modules/@types/events/index.d.ts deleted file mode 100644 index a6cf834..0000000 --- a/node_modules/@types/events/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Type definitions for events 3.0 -// Project: https://github.com/Gozala/events -// Definitions by: Yasunori Ohoka -// Shenwei Wang -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export type Listener = (...args: any[]) => void; - -export class EventEmitter { - static listenerCount(emitter: EventEmitter, type: string | number): number; - static defaultMaxListeners: number; - - eventNames(): Array; - setMaxListeners(n: number): this; - getMaxListeners(): number; - emit(type: string | number, ...args: any[]): boolean; - addListener(type: string | number, listener: Listener): this; - on(type: string | number, listener: Listener): this; - once(type: string | number, listener: Listener): this; - prependListener(type: string | number, listener: Listener): this; - prependOnceListener(type: string | number, listener: Listener): this; - removeListener(type: string | number, listener: Listener): this; - off(type: string | number, listener: Listener): this; - removeAllListeners(type?: string | number): this; - listeners(type: string | number): Listener[]; - listenerCount(type: string | number): number; - rawListeners(type: string | number): Listener[]; -} diff --git a/node_modules/@types/events/package.json b/node_modules/@types/events/package.json deleted file mode 100644 index 2377f57..0000000 --- a/node_modules/@types/events/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_args": [ - [ - "@types/events@3.0.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/events@3.0.0", - "_id": "@types/events@3.0.0", - "_inBundle": false, - "_integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "_location": "/@types/events", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/events@3.0.0", - "name": "@types/events", - "escapedName": "@types%2fevents", - "scope": "@types", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/@types/glob" - ], - "_resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Yasunori Ohoka", - "url": "https://github.com/yasupeke" - }, - { - "name": "Shenwei Wang", - "url": "https://github.com/weareoutman" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for events", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/events", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "types": "index", - "typesPublisherContentHash": "ae078136220837864b64cc7c1c5267ca1ceb809166fb74569e637bc7de9f2e12", - "version": "3.0.0" -} diff --git a/node_modules/@types/glob/LICENSE b/node_modules/@types/glob/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/node_modules/@types/glob/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/glob/README.md b/node_modules/@types/glob/README.md deleted file mode 100644 index 155da08..0000000 --- a/node_modules/@types/glob/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/glob` - -# Summary -This package contains type definitions for Glob (https://github.com/isaacs/node-glob). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob - -Additional Details - * Last updated: Thu, 27 Sep 2018 12:34:19 GMT - * Dependencies: events, minimatch, node - * Global values: none - -# Credits -These definitions were written by vvakame , voy , Klaus Meinhardt . diff --git a/node_modules/@types/glob/index.d.ts b/node_modules/@types/glob/index.d.ts deleted file mode 100644 index fc8c988..0000000 --- a/node_modules/@types/glob/index.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Type definitions for Glob 7.1 -// Project: https://github.com/isaacs/node-glob -// Definitions by: vvakame -// voy -// Klaus Meinhardt -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -import events = require("events"); -import minimatch = require("minimatch"); - -declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): void; -declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): void; - -declare namespace G { - function __promisify__(pattern: string, options?: IOptions): Promise; - - function sync(pattern: string, options?: IOptions): string[]; - - function hasMagic(pattern: string, options?: IOptions): boolean; - - let Glob: IGlobStatic; - let GlobSync: IGlobSyncStatic; - - interface IOptions extends minimatch.IOptions { - cwd?: string; - root?: string; - dot?: boolean; - nomount?: boolean; - mark?: boolean; - nosort?: boolean; - stat?: boolean; - silent?: boolean; - strict?: boolean; - cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray }; - statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined }; - symlinks?: { [path: string]: boolean | undefined }; - realpathCache?: { [path: string]: string }; - sync?: boolean; - nounique?: boolean; - nonull?: boolean; - debug?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - noext?: boolean; - nocase?: boolean; - matchBase?: any; - nodir?: boolean; - ignore?: string | ReadonlyArray; - follow?: boolean; - realpath?: boolean; - nonegate?: boolean; - nocomment?: boolean; - absolute?: boolean; - } - - interface IGlobStatic extends events.EventEmitter { - new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob; - new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob; - prototype: IGlob; - } - - interface IGlobSyncStatic { - new (pattern: string, options?: IOptions): IGlobBase; - prototype: IGlobBase; - } - - interface IGlobBase { - minimatch: minimatch.IMinimatch; - options: IOptions; - aborted: boolean; - cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray }; - statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined }; - symlinks: { [path: string]: boolean | undefined }; - realpathCache: { [path: string]: string }; - found: string[]; - } - - interface IGlob extends IGlobBase, events.EventEmitter { - pause(): void; - resume(): void; - abort(): void; - } -} - -export = G; diff --git a/node_modules/@types/glob/package.json b/node_modules/@types/glob/package.json deleted file mode 100644 index 787b05a..0000000 --- a/node_modules/@types/glob/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "@types/glob@7.1.1", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/glob@7.1.1", - "_id": "@types/glob@7.1.1", - "_inBundle": false, - "_integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "_location": "/@types/glob", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/glob@7.1.1", - "name": "@types/glob", - "escapedName": "@types%2fglob", - "scope": "@types", - "rawSpec": "7.1.1", - "saveSpec": null, - "fetchSpec": "7.1.1" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "_spec": "7.1.1", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "vvakame", - "url": "https://github.com/vvakame" - }, - { - "name": "voy", - "url": "https://github.com/voy" - }, - { - "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff" - } - ], - "dependencies": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - }, - "description": "TypeScript definitions for Glob", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/glob", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "typesPublisherContentHash": "43019f2af91c7a4ca3453c4b806a01c521ca3008ffe1bfefd37c5f9d6135660e", - "version": "7.1.1" -} diff --git a/node_modules/@types/minimatch/LICENSE b/node_modules/@types/minimatch/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/node_modules/@types/minimatch/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/minimatch/README.md b/node_modules/@types/minimatch/README.md deleted file mode 100644 index 00dc230..0000000 --- a/node_modules/@types/minimatch/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/minimatch` - -# Summary -This package contains type definitions for Minimatch (https://github.com/isaacs/minimatch). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimatch - -Additional Details - * Last updated: Thu, 04 Jan 2018 23:26:01 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by vvakame , Shant Marouti . diff --git a/node_modules/@types/minimatch/index.d.ts b/node_modules/@types/minimatch/index.d.ts deleted file mode 100644 index d6982de..0000000 --- a/node_modules/@types/minimatch/index.d.ts +++ /dev/null @@ -1,214 +0,0 @@ -// Type definitions for Minimatch 3.0 -// Project: https://github.com/isaacs/minimatch -// Definitions by: vvakame -// Shant Marouti -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** - * Tests a path against the pattern using the options. - */ -declare function M(target: string, pattern: string, options?: M.IOptions): boolean; - -declare namespace M { - /** - * Match against the list of files, in the style of fnmatch or glob. - * If nothing is matched, and options.nonull is set, - * then return a list containing the pattern itself. - */ - function match(list: ReadonlyArray, pattern: string, options?: IOptions): string[]; - - /** - * Returns a function that tests its supplied argument, suitable for use with Array.filter - */ - function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: ReadonlyArray) => boolean; - - /** - * Make a regular expression object from the pattern. - */ - function makeRe(pattern: string, options?: IOptions): RegExp; - - let Minimatch: IMinimatchStatic; - - interface IOptions { - /** - * Dump a ton of stuff to stderr. - * - * @default false - */ - debug?: boolean; - - /** - * Do not expand {a,b} and {1..3} brace sets. - * - * @default false - */ - nobrace?: boolean; - - /** - * Disable ** matching against multiple folder names. - * - * @default false - */ - noglobstar?: boolean; - - /** - * Allow patterns to match filenames starting with a period, - * even if the pattern does not explicitly have a period in that spot. - * - * @default false - */ - dot?: boolean; - - /** - * Disable "extglob" style patterns like +(a|b). - * - * @default false - */ - noext?: boolean; - - /** - * Perform a case-insensitive match. - * - * @default false - */ - nocase?: boolean; - - /** - * When a match is not found by minimatch.match, - * return a list containing the pattern itself if this option is set. - * Otherwise, an empty list is returned if there are no matches. - * - * @default false - */ - nonull?: boolean; - - /** - * If set, then patterns without slashes will be matched against - * the basename of the path if it contains slashes. - * - * @default false - */ - matchBase?: boolean; - - /** - * Suppress the behavior of treating # - * at the start of a pattern as a comment. - * - * @default false - */ - nocomment?: boolean; - - /** - * Suppress the behavior of treating a leading ! character as negation. - * - * @default false - */ - nonegate?: boolean; - - /** - * Returns from negate expressions the same as if they were not negated. - * (Ie, true on a hit, false on a miss.) - * - * @default false - */ - flipNegate?: boolean; - } - - interface IMinimatchStatic { - new(pattern: string, options?: IOptions): IMinimatch; - prototype: IMinimatch; - } - - interface IMinimatch { - /** - * The original pattern the minimatch object represents. - */ - pattern: string; - - /** - * The options supplied to the constructor. - */ - options: IOptions; - - /** - * A 2-dimensional array of regexp or string expressions. - */ - set: any[][]; // (RegExp | string)[][] - - /** - * A single regular expression expressing the entire pattern. - * Created by the makeRe method. - */ - regexp: RegExp; - - /** - * True if the pattern is negated. - */ - negate: boolean; - - /** - * True if the pattern is a comment. - */ - comment: boolean; - - /** - * True if the pattern is "" - */ - empty: boolean; - - /** - * Generate the regexp member if necessary, and return it. - * Will return false if the pattern is invalid. - */ - makeRe(): RegExp; // regexp or boolean - - /** - * Return true if the filename matches the pattern, or false otherwise. - */ - match(fname: string): boolean; - - /** - * Take a /-split filename, and match it against a single row in the regExpSet. - * This method is mainly for internal use, but is exposed so that it can be used - * by a glob-walker that needs to avoid excessive filesystem calls. - */ - matchOne(files: string[], pattern: string[], partial: boolean): boolean; - - /** - * Deprecated. For internal use. - * - * @private - */ - debug(): void; - - /** - * Deprecated. For internal use. - * - * @private - */ - make(): void; - - /** - * Deprecated. For internal use. - * - * @private - */ - parseNegate(): void; - - /** - * Deprecated. For internal use. - * - * @private - */ - braceExpand(pattern: string, options: IOptions): void; - - /** - * Deprecated. For internal use. - * - * @private - */ - parse(pattern: string, isSub?: boolean): void; - } -} - -export = M; diff --git a/node_modules/@types/minimatch/package.json b/node_modules/@types/minimatch/package.json deleted file mode 100644 index 88e2af7..0000000 --- a/node_modules/@types/minimatch/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "@types/minimatch@3.0.3", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/minimatch@3.0.3", - "_id": "@types/minimatch@3.0.3", - "_inBundle": false, - "_integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "_location": "/@types/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/minimatch@3.0.3", - "name": "@types/minimatch", - "escapedName": "@types%2fminimatch", - "scope": "@types", - "rawSpec": "3.0.3", - "saveSpec": null, - "fetchSpec": "3.0.3" - }, - "_requiredBy": [ - "/@types/glob" - ], - "_resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "_spec": "3.0.3", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "vvakame", - "url": "https://github.com/vvakame" - }, - { - "name": "Shant Marouti", - "url": "https://github.com/shantmarouti" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for Minimatch", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/minimatch", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "typesPublisherContentHash": "e768e36348874adcc93ac67e9c3c7b5fcbd39079c0610ec16e410b8f851308d1", - "version": "3.0.3" -} diff --git a/node_modules/@types/mocha/LICENSE b/node_modules/@types/mocha/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/node_modules/@types/mocha/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/mocha/README.md b/node_modules/@types/mocha/README.md deleted file mode 100644 index 0c05285..0000000 --- a/node_modules/@types/mocha/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/mocha` - -# Summary -This package contains type definitions for mocha ( https://mochajs.org ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mocha - -Additional Details - * Last updated: Thu, 30 May 2019 18:05:34 GMT - * Dependencies: none - * Global values: Mocha, after, afterEach, before, beforeEach, context, describe, it, mocha, run, setup, specify, suite, suiteSetup, suiteTeardown, teardown, test, xcontext, xdescribe, xit, xspecify - -# Credits -These definitions were written by Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon , Andrew Bradley , Dmitrii Sorin . diff --git a/node_modules/@types/mocha/index.d.ts b/node_modules/@types/mocha/index.d.ts deleted file mode 100644 index ef9bdf7..0000000 --- a/node_modules/@types/mocha/index.d.ts +++ /dev/null @@ -1,2986 +0,0 @@ -// Type definitions for mocha 5.2 -// Project: https://mochajs.org -// Definitions by: Kazi Manzur Rashid -// otiai10 -// jt000 -// Vadim Macagon -// Andrew Bradley -// Dmitrii Sorin -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/** - * Mocha API - * - * @see https://mochajs.org/api/mocha - */ -declare class Mocha { - private _growl; - private _reporter; - private _ui; - - constructor(options?: Mocha.MochaOptions); - - suite: Mocha.Suite; - files: string[]; - options: Mocha.MochaInstanceOptions; - - /** - * Enable or disable bailing on the first failure. - * - * @see https://mochajs.org/api/mocha#bail - */ - bail(bail?: boolean): this; - - /** - * Add test `file`. - * - * @see https://mochajs.org/api/mocha#addFile - */ - addFile(file: string): this; - - /** - * Set reporter to one of the built-in reporters. - * - * @see https://mochajs.org/api/mocha#reporter - */ - reporter(reporter: Mocha.Reporter, reporterOptions?: any): this; - - /** - * Set reporter to the provided constructor, one of the built-in reporters, or loads a reporter - * from a module path. Defaults to `"spec"`. - * - * @see https://mochajs.org/api/mocha#reporter - */ - reporter(reporter?: string | Mocha.ReporterConstructor, reporterOptions?: any): this; - - /** - * Set test UI to one of the built-in test interfaces. - * - * @see https://mochajs.org/api/mocha#ui - */ - ui(name: Mocha.Interface): this; - - /** - * Set test UI to one of the built-in test interfaces or loads a test interface from a module - * path. Defaults to `"bdd"`. - * - * @see https://mochajs.org/api/mocha#ui - */ - ui(name?: string): this; - - /** - * Escape string and add it to grep as a RegExp. - * - * @see https://mochajs.org/api/mocha#fgrep - */ - fgrep(str: string): this; - - /** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @see https://mochajs.org/api/mocha#grep - */ - grep(re: string | RegExp): this; - - /** - * Invert `.grep()` matches. - * - * @see https://mochajs.org/api/mocha#invert - */ - invert(): this; - - /** - * Ignore global leaks. - * - * @see https://mochajs.org/api/mocha#ignoreLeaks - */ - ignoreLeaks(ignore: boolean): this; - - /** - * Enable global leak checking. - * - * @see https://mochajs.org/api/mocha#checkLeaks - */ - checkLeaks(): this; - - /** - * Display long stack-trace on failing - * - * @see https://mochajs.org/api/mocha#fullTrace - */ - fullTrace(): this; - - /** - * Enable growl support. - * - * @see https://mochajs.org/api/mocha#growl - */ - growl(): this; - - /** - * Ignore `globals` array or string. - * - * @see https://mochajs.org/api/mocha#globals - */ - globals(globals: string | ReadonlyArray): this; - - /** - * Emit color output. - * - * @see https://mochajs.org/api/mocha#useColors - */ - useColors(colors: boolean): this; - - /** - * Use inline diffs rather than +/-. - * - * @see https://mochajs.org/api/mocha#useInlineDiffs - */ - useInlineDiffs(inlineDiffs: boolean): this; - - /** - * Do not show diffs at all. - * - * @see https://mochajs.org/api/mocha#hideDiff - */ - hideDiff(hideDiff: boolean): this; - - /** - * Set the timeout in milliseconds. - * - * @see https://mochajs.org/api/mocha#timeout - */ - timeout(timeout: string | number): this; - - /** - * Set the number of times to retry failed tests. - * - * @see https://mochajs.org/api/mocha#retries - */ - retries(n: number): this; - - /** - * Set slowness threshold in milliseconds. - * - * @see https://mochajs.org/api/mocha#slow - */ - slow(slow: string | number): this; - - /** - * Enable timeouts. - * - * @see https://mochajs.org/api/mocha#enableTimeouts - */ - enableTimeouts(enabled?: boolean): this; - - /** - * Makes all tests async (accepting a callback) - * - * @see https://mochajs.org/api/mocha#asyncOnly. - */ - asyncOnly(): this; - - /** - * Disable syntax highlighting (in browser). - * - * @see https://mochajs.org/api/mocha#noHighlighting - */ - noHighlighting(): this; - - /** - * Enable uncaught errors to propagate (in browser). - * - * @see https://mochajs.org/api/mocha#allowUncaught - */ - allowUncaught(): boolean; - - /** - * Delay root suite execution. - * - * @see https://mochajs.org/api/mocha#delay - */ - delay(): boolean; - - /** - * Tests marked only fail the suite - * - * @see https://mochajs.org/api/mocha#forbidOnly - */ - forbidOnly(): boolean; - - /** - * Pending tests and tests marked skip fail the suite - * - * @see https://mochajs.org/api/mocha#forbidPending - */ - forbidPending(): boolean; - - /** - * Run tests and invoke `fn()` when complete. - * - * Note that `run` relies on Node's `require` to execute - * the test interface functions and will be subject to the - * cache - if the files are already in the `require` cache, - * they will effectively be skipped. Therefore, to run tests - * multiple times or to run tests in files that are already - * in the `require` cache, make sure to clear them from the - * cache first in whichever manner best suits your needs. - * - * @see https://mochajs.org/api/mocha#run - */ - run(fn?: (failures: number) => void): Mocha.Runner; - - /** - * Load registered files. - * - * @see https://mochajs.org/api/mocha#loadFiles - */ - protected loadFiles(fn?: () => void): void; -} - -declare namespace Mocha { - namespace utils { - /** - * Compute a slug from the given `str`. - * - * @see https://mochajs.org/api/module-utils.html#.slug - */ - function slug(str: string): string; - - /** - * Strip the function definition from `str`, and re-indent for pre whitespace. - * - * @see https://mochajs.org/api/module-utils.html#.clean - */ - function clean(str: string): string; - - /** - * Highlight the given string of `js`. - */ - function highlight(js: string): string; - - /** - * Takes some variable and asks `Object.prototype.toString()` what it thinks it is. - */ - function type(value: any): string; - - /** - * Stringify `value`. Different behavior depending on type of value: - * - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, returns `'{}'`, `'[Function]'`, or `'[]'` respectively. - * - If `value` has properties, call canonicalize} on it, then return result of `JSON.stringify()` - * - * @see https://mochajs.org/api/module-utils.html#.stringify - */ - function stringify(value: any): string; - - /** - * Return a new Thing that has the keys in sorted order. Recursive. - * - * If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, returns `'[]'`, `'{}'`, or `'[Function]'` respectively. - * - * @see https://mochajs.org/api/module-utils.html#.canonicalize - */ - function canonicalize(value: any, stack: any[], typeHint: string): any; - - /** - * Lookup file names at the given `path`. - * - * @see https://mochajs.org/api/Mocha.utils.html#.exports.lookupFiles - */ - function lookupFiles(filepath: string, extensions?: string[], recursive?: boolean): string[]; - - /** - * Generate an undefined error with a message warning the user. - * - * @see https://mochajs.org/api/module-utils.html#.undefinedError - */ - function undefinedError(): Error; - - /** - * Generate an undefined error if `err` is not defined. - * - * @see https://mochajs.org/api/module-utils.html#.getError - */ - function getError(err: Error | undefined): Error; - - /** - * When invoking this function you get a filter function that get the Error.stack as an - * input, and return a prettify output. (i.e: strip Mocha and internal node functions from - * stack trace). - * - * @see https://mochajs.org/api/module-utils.html#.stackTraceFilter - */ - function stackTraceFilter(): (stack: string) => string; - } - - namespace interfaces { - function bdd(suite: Suite): void; - function tdd(suite: Suite): void; - function qunit(suite: Suite): void; - function exports(suite: Suite): void; - } - - // #region Test interface augmentations - - interface HookFunction { - /** - * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the - * function is used as the name of the hook. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: Func): void; - - /** - * [bdd, qunit, tdd] Describe a "hook" to execute the given callback `fn`. The name of the - * function is used as the name of the hook. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: AsyncFunc): void; - - /** - * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. - * - * - _Only available when invoked via the mocha CLI._ - */ - (name: string, fn?: Func): void; - - /** - * [bdd, qunit, tdd] Describe a "hook" to execute the given `title` and callback `fn`. - * - * - _Only available when invoked via the mocha CLI._ - */ - (name: string, fn?: AsyncFunc): void; - } - - interface SuiteFunction { - /** - * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing - * nested suites. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn: (this: Suite) => void): Suite; - - /** - * [qunit] Describe a "suite" with the given `title`. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string): Suite; - - /** - * [bdd, tdd, qunit] Indicates this suite should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - only: ExclusiveSuiteFunction; - - /** - * [bdd, tdd] Indicates this suite should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - skip: PendingSuiteFunction; - } - - interface ExclusiveSuiteFunction { - /** - * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing - * nested suites. Indicates this suite should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn: (this: Suite) => void): Suite; - - /** - * [qunit] Describe a "suite" with the given `title`. Indicates this suite should be executed - * exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string): Suite; - } - - /** - * [bdd, tdd] Describe a "suite" with the given `title` and callback `fn` containing - * nested suites. Indicates this suite should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - * - * @returns [bdd] `Suite` - * @returns [tdd] `void` - */ - interface PendingSuiteFunction { - (title: string, fn: (this: Suite) => void): Suite | void; - } - - interface TestFunction { - /** - * Describe a specification or test-case with the given callback `fn` acting as a thunk. - * The name of the function is used as the name of the test. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: Func): Test; - - /** - * Describe a specification or test-case with the given callback `fn` acting as a thunk. - * The name of the function is used as the name of the test. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: AsyncFunc): Test; - - /** - * Describe a specification or test-case with the given `title` and callback `fn` acting - * as a thunk. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: Func): Test; - - /** - * Describe a specification or test-case with the given `title` and callback `fn` acting - * as a thunk. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: AsyncFunc): Test; - - /** - * Indicates this test should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - only: ExclusiveTestFunction; - - /** - * Indicates this test should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - skip: PendingTestFunction; - - /** - * Number of attempts to retry. - * - * - _Only available when invoked via the mocha CLI._ - */ - retries(n: number): void; - } - - interface ExclusiveTestFunction { - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` - * acting as a thunk. The name of the function is used as the name of the test. Indicates - * this test should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: Func): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` - * acting as a thunk. The name of the function is used as the name of the test. Indicates - * this test should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: AsyncFunc): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: Func): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. Indicates this test should be executed exclusively. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: AsyncFunc): Test; - } - - interface PendingTestFunction { - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` - * acting as a thunk. The name of the function is used as the name of the test. Indicates - * this test should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: Func): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn` - * acting as a thunk. The name of the function is used as the name of the test. Indicates - * this test should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - (fn: AsyncFunc): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. Indicates this test should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: Func): Test; - - /** - * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. Indicates this test should not be executed. - * - * - _Only available when invoked via the mocha CLI._ - */ - (title: string, fn?: AsyncFunc): Test; - } - - /** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ - let afterEach: HookFunction; - - /** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ - let after: HookFunction; - - /** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ - let beforeEach: HookFunction; - - /** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ - let before: HookFunction; - - /** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ - let describe: SuiteFunction; - - /** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - let it: TestFunction; - - /** - * Describes a pending test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - let xit: PendingTestFunction; - - /** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ - let setup: HookFunction; - - /** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ - let suiteSetup: HookFunction; - - /** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ - let suiteTeardown: HookFunction; - - /** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ - let suite: SuiteFunction; - - /** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ - let teardown: HookFunction; - - /** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - let test: TestFunction; - - /** - * Triggers root suite execution. - * - * - _Only available if flag --delay is passed into Mocha._ - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#runWithSuite - */ - function run(): void; - - // #endregion Test interface augmentations - - namespace reporters { - /** - * Initialize a new `Base` reporter. - * - * All other reporters generally inherit from this reporter, providing stats such as test duration, - * number of tests passed / failed, etc. - * - * @see https://mochajs.org/api/Mocha.reporters.Base.html - */ - class Base { - constructor(runner: Runner, options?: MochaOptions); - /** @deprecated Use the overload that accepts `Mocha.Runner` instead. */ - constructor(runner: IRunner, options?: MochaOptions); - - /** - * Test run statistics - */ - stats: Stats; - - /** - * Test failures - */ - failures: Test[]; - - /** - * The configured runner - */ - runner: Runner; - - /** - * Output common epilogue used by many of the bundled reporters. - * - * @see https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue - */ - epilogue(): void; - - done?(failures: number, fn?: (failures: number) => void): void; - } - - namespace Base { - /** - * Enables coloring by default - * - * @see https://mochajs.org/api/module-base#.useColors - */ - let useColors: boolean; - - /** - * Inline diffs instead of +/- - * - * @see https://mochajs.org/api/module-base#.inlineDiffs - */ - let inlineDiffs: boolean; - - /** - * Default color map - * - * @see https://mochajs.org/api/module-base#.colors - */ - const colors: ColorMap; - - /** - * Default color map - * - * @see https://mochajs.org/api/module-base#.colors - */ - interface ColorMap { - // added by Base - pass: number; - fail: number; - "bright pass": number; - "bright fail": number; - "bright yellow": number; - pending: number; - suite: number; - "error title": number; - "error message": number; - "error stack": number; - checkmark: number; - fast: number; - medium: number; - slow: number; - green: number; - light: number; - "diff gutter": number; - "diff added": number; - "diff removed": number; - - // added by Progress - progress: number; - - // added by Landing - plane: number; - "plane crash": number; - runway: number; - - [key: string]: number; - } - - /** - * Default symbol map - * - * @see https://mochajs.org/api/module-base#.symbols - */ - const symbols: SymbolMap; - - /** - * Default symbol map - * - * @see https://mochajs.org/api/module-base#.symbols - */ - interface SymbolMap { - ok: string; - err: string; - dot: string; - comma: string; - bang: string; - [key: string]: string; - } - - /** - * Color `str` with the given `type` (from `colors`) - * - * @see https://mochajs.org/api/module-base#.color - */ - function color(type: string, str: string): string; - - /** - * Expose terminal window size - * - * @see https://mochajs.org/api/module-base#.window - */ - const window: { - width: number; - }; - - /** - * ANSI TTY control sequences common among reporters. - * - * @see https://mochajs.org/api/module-base#.cursor - */ - namespace cursor { - /** - * Hides the cursor - */ - function hide(): void; - - /** - * Shows the cursor - */ - function show(): void; - - /** - * Deletes the current line - */ - function deleteLine(): void; - - /** - * Moves to the beginning of the line - */ - function beginningOfLine(): void; - - /** - * Clears the line and moves to the beginning of the line. - */ - function CR(): void; - } - - /** - * Returns a diff between two strings with colored ANSI output. - * - * @see https://mochajs.org/api/module-base#.generateDiff - */ - function generateDiff(actual: string, expected: string): string; - - /** - * Output the given `failures` as a list. - * - * @see https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1 - */ - function list(failures: Test[]): void; - } - - /** - * Initialize a new `Dot` matrix test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Dot.html - */ - class Dot extends Base { - } - - /** - * Initialize a new `Doc` reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Doc.html - */ - class Doc extends Base { - } - - /** - * Initialize a new `TAP` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.TAP.html - */ - class TAP extends Base { - } - - /** - * Initialize a new `JSON` reporter - * - * @see https://mochajs.org/api/Mocha.reporters.JSON.html - */ - class JSON extends Base { - } - - /** - * Initialize a new `HTML` reporter. - * - * - _This reporter cannot be used on the console._ - * - * @see https://mochajs.org/api/Mocha.reporters.HTML.html - */ - class HTML extends Base { - /** - * Provide suite URL. - * - * @see https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL - */ - suiteURL(suite: Suite): string; - - /** - * Provide test URL. - * - * @see https://mochajs.org/api/Mocha.reporters.HTML.html#testURL - */ - testURL(test: Test): string; - - /** - * Adds code toggle functionality for the provided test's list element. - * - * @see https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle - */ - addCodeToggle(el: HTMLLIElement, contents: string): void; - } - - /** - * Initialize a new `List` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.List.html - */ - class List extends Base { - } - - /** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @see https://mochajs.org/api/Mocha.reporters.Min.html - */ - class Min extends Base { - } - - /** - * Initialize a new `Spec` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Spec.html - */ - class Spec extends Base { - } - - /** - * Initialize a new `NyanCat` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Nyan.html - */ - class Nyan extends Base { - private colorIndex; - private numberOfLines; - private rainbowColors; - private scoreboardWidth; - private tick; - private trajectories; - private trajectoryWidthMax; - private draw; - private drawScoreboard; - private appendRainbow; - private drawRainbow; - private drawNyanCat; - private face; - private cursorUp; - private cursorDown; - private generateColors; - private rainbowify; - } - - /** - * Initialize a new `XUnit` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.XUnit.html - */ - class XUnit extends Base { - constructor(runner: Runner, options?: XUnit.MochaOptions); - /** @deprecated Use the overload that accepts `Mocha.Runner` instead. */ - constructor(runner: IRunner, options?: XUnit.MochaOptions); - - /** - * Override done to close the stream (if it's a file). - * - * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#done - */ - done(failures: number, fn: (failures: number) => void): void; - - /** - * Write out the given line. - * - * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#write - */ - write(line: string): void; - - /** - * Output tag for the given `test.` - * - * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#test - */ - test(test: Test): void; - } - - namespace XUnit { - interface MochaOptions extends Mocha.MochaOptions { - reporterOptions?: ReporterOptions; - } - - interface ReporterOptions { - output?: string; - suiteName?: string; - } - } - - /** - * Initialize a new `Markdown` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Markdown.html - */ - class Markdown extends Base { - } - - /** - * Initialize a new `Progress` bar test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Progress.html - */ - class Progress extends Base { - constructor(runner: Runner, options?: Progress.MochaOptions); - /** @deprecated Use the overload that accepts `Mocha.Runner` instead. */ - constructor(runner: IRunner, options?: Progress.MochaOptions); - } - - namespace Progress { - interface MochaOptions extends Mocha.MochaOptions { - reporterOptions?: ReporterOptions; - } - - interface ReporterOptions { - open?: string; - complete?: string; - incomplete?: string; - close?: string; - verbose?: boolean; - } - } - - /** - * Initialize a new `Landing` reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.Landing.html - */ - class Landing extends Base { - } - - /** - * Initialize a new `JSONStream` test reporter. - * - * @see https://mochajs.org/api/Mocha.reporters.JSONStream.html - */ - class JSONStream extends Base { - } - - // value-only aliases - const base: typeof Base; - const dot: typeof Dot; - const doc: typeof Doc; - const tap: typeof TAP; - const json: typeof JSON; - const html: typeof HTML; - const list: typeof List; - const spec: typeof Spec; - const nyan: typeof Nyan; - const xunit: typeof XUnit; - const markdown: typeof Markdown; - const progress: typeof Progress; - const landing: typeof Landing; - // NOTE: not possible to type this correctly: - // const "json-stream": typeof JSONStream; - } - - /** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @see https://mochajs.org/api/Runnable.html - */ - class Runnable { - private _slow; - private _enableTimeouts; - private _retries; - private _currentRetry; - private _timeout; - private _timeoutError; - - constructor(title: string, fn?: Func | AsyncFunc); - - title: string; - fn: Func | AsyncFunc | undefined; - body: string; - async: boolean; - sync: boolean; - timedOut: boolean; - pending: boolean; - duration?: number; - parent?: Suite; - state?: "failed" | "passed"; - timer?: any; - ctx?: Context; - callback?: Done; - allowUncaught?: boolean; - file?: string; - - /** - * Get test timeout. - * - * @see https://mochajs.org/api/Runnable.html#timeout - */ - timeout(): number; - - /** - * Set test timeout. - * - * @see https://mochajs.org/api/Runnable.html#timeout - */ - timeout(ms: string | number): this; - - /** - * Get test slowness threshold. - * - * @see https://mochajs.org/api/Runnable.html#slow - */ - slow(): number; - - /** - * Set test slowness threshold. - * - * @see https://mochajs.org/api/Runnable.html#slow - */ - slow(ms: string | number): this; - - /** - * Get whether timeouts are enabled. - * - * @see https://mochajs.org/api/Runnable.html#enableTimeouts - */ - enableTimeouts(): boolean; - - /** - * Set whether timeouts are enabled. - * - * @see https://mochajs.org/api/Runnable.html#enableTimeouts - */ - enableTimeouts(enabled: boolean): this; - - /** - * Halt and mark as pending. - */ - skip(): never; - - /** - * Check if this runnable or its parent suite is marked as pending. - * - * @see https://mochajs.org/api/Runnable.html#isPending - */ - isPending(): boolean; - - /** - * Return `true` if this Runnable has failed. - */ - isFailed(): boolean; - - /** - * Return `true` if this Runnable has passed. - */ - isPassed(): boolean; - - /** - * Set or get number of retries. - * - * @see https://mochajs.org/api/Runnable.html#retries - */ - retries(): number; - - /** - * Set or get number of retries. - * - * @see https://mochajs.org/api/Runnable.html#retries - */ - retries(n: number): void; - - /** - * Set or get current retry - * - * @see https://mochajs.org/api/Runnable.html#currentRetry - */ - protected currentRetry(): number; - - /** - * Set or get current retry - * - * @see https://mochajs.org/api/Runnable.html#currentRetry - */ - protected currentRetry(n: number): void; - - /** - * Return the full title generated by recursively concatenating the parent's full title. - */ - fullTitle(): string; - - /** - * Return the title path generated by concatenating the parent's title path with the title. - */ - titlePath(): string[]; - - /** - * Clear the timeout. - * - * @see https://mochajs.org/api/Runnable.html#clearTimeout - */ - clearTimeout(): void; - - /** - * Inspect the runnable void of private properties. - * - * @see https://mochajs.org/api/Runnable.html#inspect - */ - inspect(): string; - - /** - * Reset the timeout. - * - * @see https://mochajs.org/api/Runnable.html#resetTimeout - */ - resetTimeout(): void; - - /** - * Get a list of whitelisted globals for this test run. - * - * @see https://mochajs.org/api/Runnable.html#globals - */ - globals(): string[]; - - /** - * Set a list of whitelisted globals for this test run. - * - * @see https://mochajs.org/api/Runnable.html#globals - */ - globals(globals: ReadonlyArray): void; - - /** - * Run the test and invoke `fn(err)`. - * - * @see https://mochajs.org/api/Runnable.html#run - */ - run(fn: Done): void; - } - - // #region Runnable "error" event - interface Runnable extends NodeJS.EventEmitter { - on(event: "error", listener: (error: any) => void): this; - once(event: "error", listener: (error: any) => void): this; - addListener(event: "error", listener: (error: any) => void): this; - removeListener(event: "error", listener: (error: any) => void): this; - prependListener(event: "error", listener: (error: any) => void): this; - prependOnceListener(event: "error", listener: (error: any) => void): this; - emit(name: "error", error: any): boolean; - } - // #endregion Runnable "error" event - // #region Runnable untyped events - interface Runnable extends NodeJS.EventEmitter { - on(event: string, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - emit(name: string, ...args: any[]): boolean; - } - // #endregion Runnable untyped events - - /** - * Test context - * - * @see https://mochajs.org/api/module-Context.html#~Context - */ - class Context { - private _runnable; - - test?: Runnable; - currentTest?: Test; - - /** - * Get the context `Runnable`. - */ - runnable(): Runnable; - - /** - * Set the context `Runnable`. - */ - runnable(runnable: Runnable): this; - /** @deprecated Use the overload that accepts `Mocha.Runnable` instead. */ - runnable(runnable: IRunnable): this; - - /** - * Get test timeout. - */ - timeout(): number; - - /** - * Set test timeout. - */ - timeout(ms: string | number): this; - - /** - * Get whether timeouts are enabled. - */ - enableTimeouts(): boolean; - - /** - * Set whether timeouts are enabled. - */ - enableTimeouts(enabled: boolean): this; - - /** - * Get test slowness threshold. - */ - slow(): number; - - /** - * Set test slowness threshold. - */ - slow(ms: string | number): this; - - /** - * Mark a test as skipped. - */ - skip(): never; - - /** - * Get the number of allowed retries on failed tests. - */ - retries(): number; - - /** - * Set the number of allowed retries on failed tests. - */ - retries(n: number): this; - - [key: string]: any; - } - - /** - * Initialize a `Runner` for the given `suite`. - * - * @see https://mochajs.org/api/Mocha.Runner.html - */ - class Runner { - private _globals; - private _abort; - private _delay; - private _defaultGrep; - private next; - private hookErr; - private prevGlobalsLength; - private nextSuite; - - constructor(suite: Suite, delay: boolean); - - /** @deprecated Use the overload that accepts `Mocha.Suite` instead. */ - constructor(suite: ISuite, delay: boolean); - - suite: Suite; - started: boolean; - total: number; - failures: number; - asyncOnly?: boolean; - allowUncaught?: boolean; - fullStackTrace?: boolean; - forbidOnly?: boolean; - forbidPending?: boolean; - ignoreLeaks?: boolean; - test?: Test; - currentRunnable?: Runnable; - stats?: Stats; // added by reporters - - /** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grep - */ - grep(re: RegExp, invert: boolean): this; - - /** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal - */ - grepTotal(suite: Suite): number; - - /** @deprecated Use the overload that accepts `Mocha.Suite` instead. */ - grepTotal(suite: ISuite): number; - - /** - * Gets the allowed globals. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals - */ - globals(): string[]; - - /** - * Allow the given `arr` of globals. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals - */ - globals(arr: ReadonlyArray): this; - - /** - * Run the root suite and invoke `fn(failures)` on completion. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#run - */ - run(fn?: (failures: number) => void): this; - - /** - * Cleanly abort execution. - * - * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#abort - */ - abort(): this; - - /** - * Handle uncaught exceptions. - * - * @see https://mochajs.org/api/Mocha.Runner.html#uncaught - */ - uncaught(err: any): void; - - /** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - */ - protected static immediately(callback: Function): void; - - /** - * Return a list of global properties. - * - * @see https://mochajs.org/api/Mocha.Runner.html#globalProps - */ - protected globalProps(): string[]; - - /** - * Check for global variable leaks. - * - * @see https://mochajs.org/api/Mocha.Runner.html#checkGlobals - */ - protected checkGlobals(test: Test): void; - - /** - * Fail the given `test`. - * - * @see https://mochajs.org/api/Mocha.Runner.html#fail - */ - protected fail(test: Test, err: any): void; - - /** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @see https://mochajs.org/api/Mocha.Runner.html#failHook - */ - protected failHook(hook: Hook, err: any): void; - - /** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @see https://mochajs.org/api/Mocha.Runner.html#hook - */ - protected hook(name: string, fn: () => void): void; - - /** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @see https://mochajs.org/api/Mocha.Runner.html#hooks - */ - protected hooks(name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void): void; - - /** - * Run hooks from the top level down. - * - * @see https://mochajs.org/api/Mocha.Runner.html#hookUp - */ - protected hookUp(name: string, fn: (err?: any, errSuite?: Suite) => void): void; - - /** - * Run hooks from the bottom up. - * - * @see https://mochajs.org/api/Mocha.Runner.html#hookDown - */ - protected hookDown(name: string, fn: (err?: any, errSuite?: Suite) => void): void; - - /** - * Return an array of parent Suites from closest to furthest. - * - * @see https://mochajs.org/api/Mocha.Runner.html#parents - */ - protected parents(): Suite[]; - - /** - * Run the current test and callback `fn(err)`. - * - * @see https://mochajs.org/api/Mocha.Runner.html#runTest - */ - protected runTest(fn: Done): any; - - /** - * Run tests in the given `suite` and invoke the callback `fn()` when complete. - * - * @see https://mochajs.org/api/Mocha.Runner.html#runTests - */ - protected runTests(suite: Suite, fn: (errSuite?: Suite) => void): void; - - /** - * Run the given `suite` and invoke the callback `fn()` when complete. - * - * @see https://mochajs.org/api/Mocha.Runner.html#runSuite - */ - protected runSuite(suite: Suite, fn: (errSuite?: Suite) => void): void; - } - - // #region Runner "waiting" event - interface Runner { - on(event: "waiting", listener: (rootSuite: Suite) => void): this; - once(event: "waiting", listener: (rootSuite: Suite) => void): this; - addListener(event: "waiting", listener: (rootSuite: Suite) => void): this; - removeListener(event: "waiting", listener: (rootSuite: Suite) => void): this; - prependListener(event: "waiting", listener: (rootSuite: Suite) => void): this; - prependOnceListener(event: "waiting", listener: (rootSuite: Suite) => void): this; - emit(name: "waiting", rootSuite: Suite): boolean; - } - // #endregion Runner "waiting" event - // #region Runner "start" event - interface Runner extends NodeJS.EventEmitter { - on(event: "start", listener: () => void): this; - once(event: "start", listener: () => void): this; - addListener(event: "start", listener: () => void): this; - removeListener(event: "start", listener: () => void): this; - prependListener(event: "start", listener: () => void): this; - prependOnceListener(event: "start", listener: () => void): this; - emit(name: "start"): boolean; - } - // #endregion Runner "start" event - // #region Runner "end" event - interface Runner extends NodeJS.EventEmitter { - on(event: "end", listener: () => void): this; - once(event: "end", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - removeListener(event: "end", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - emit(name: "end"): boolean; - } - // #endregion Runner "end" event - // #region Runner "suite" event - interface Runner extends NodeJS.EventEmitter { - on(event: "suite", listener: (suite: Suite) => void): this; - once(event: "suite", listener: (suite: Suite) => void): this; - addListener(event: "suite", listener: (suite: Suite) => void): this; - removeListener(event: "suite", listener: (suite: Suite) => void): this; - prependListener(event: "suite", listener: (suite: Suite) => void): this; - prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; - emit(name: "suite", suite: Suite): boolean; - } - // #endregion Runner "suite" event - // #region Runner "suite end" event - interface Runner extends NodeJS.EventEmitter { - on(event: "suite end", listener: (suite: Suite) => void): this; - once(event: "suite end", listener: (suite: Suite) => void): this; - addListener(event: "suite end", listener: (suite: Suite) => void): this; - removeListener(event: "suite end", listener: (suite: Suite) => void): this; - prependListener(event: "suite end", listener: (suite: Suite) => void): this; - prependOnceListener(event: "suite end", listener: (suite: Suite) => void): this; - emit(name: "suite end", suite: Suite): boolean; - } - // #endregion Runner "suite end" event - // #region Runner "test" event - interface Runner extends NodeJS.EventEmitter { - on(event: "test", listener: (test: Test) => void): this; - once(event: "test", listener: (test: Test) => void): this; - addListener(event: "test", listener: (test: Test) => void): this; - removeListener(event: "test", listener: (test: Test) => void): this; - prependListener(event: "test", listener: (test: Test) => void): this; - prependOnceListener(event: "test", listener: (test: Test) => void): this; - emit(name: "test", test: Test): boolean; - } - // #endregion Runner "test" event - // #region Runner "test end" event - interface Runner extends NodeJS.EventEmitter { - on(event: "test end", listener: (test: Test) => void): this; - once(event: "test end", listener: (test: Test) => void): this; - addListener(event: "test end", listener: (test: Test) => void): this; - removeListener(event: "test end", listener: (test: Test) => void): this; - prependListener(event: "test end", listener: (test: Test) => void): this; - prependOnceListener(event: "test end", listener: (test: Test) => void): this; - emit(name: "test end", test: Test): boolean; - } - // #endregion Runner "test end" event - // #region Runner "hook" event - interface Runner extends NodeJS.EventEmitter { - on(event: "hook", listener: (hook: Hook) => void): this; - once(event: "hook", listener: (hook: Hook) => void): this; - addListener(event: "hook", listener: (hook: Hook) => void): this; - removeListener(event: "hook", listener: (hook: Hook) => void): this; - prependListener(event: "hook", listener: (hook: Hook) => void): this; - prependOnceListener(event: "hook", listener: (hook: Hook) => void): this; - emit(name: "hook", hook: Hook): boolean; - } - // #endregion Runner "hook" event - // #region Runner "hook end" event - interface Runner extends NodeJS.EventEmitter { - on(event: "hook end", listener: (hook: Hook) => void): this; - once(event: "hook end", listener: (hook: Hook) => void): this; - addListener(event: "hook end", listener: (hook: Hook) => void): this; - removeListener(event: "hook end", listener: (hook: Hook) => void): this; - prependListener(event: "hook end", listener: (hook: Hook) => void): this; - prependOnceListener(event: "hook end", listener: (hook: Hook) => void): this; - emit(name: "hook end", hook: Hook): boolean; - } - // #endregion Runner "hook end" event - // #region Runner "pass" event - interface Runner extends NodeJS.EventEmitter { - on(event: "pass", listener: (test: Test) => void): this; - once(event: "pass", listener: (test: Test) => void): this; - addListener(event: "pass", listener: (test: Test) => void): this; - removeListener(event: "pass", listener: (test: Test) => void): this; - prependListener(event: "pass", listener: (test: Test) => void): this; - prependOnceListener(event: "pass", listener: (test: Test) => void): this; - emit(name: "pass", test: Test): boolean; - } - // #endregion Runner "pass" event - // #region Runner "fail" event - interface Runner extends NodeJS.EventEmitter { - on(event: "fail", listener: (test: Test, err: any) => void): this; - once(event: "fail", listener: (test: Test, err: any) => void): this; - addListener(event: "fail", listener: (test: Test, err: any) => void): this; - removeListener(event: "fail", listener: (test: Test, err: any) => void): this; - prependListener(event: "fail", listener: (test: Test, err: any) => void): this; - prependOnceListener(event: "fail", listener: (test: Test, err: any) => void): this; - emit(name: "fail", test: Test, err: any): boolean; - } - // #endregion Runner "fail" event - // #region Runner "pending" event - interface Runner extends NodeJS.EventEmitter { - on(event: "pending", listener: (test: Test) => void): this; - once(event: "pending", listener: (test: Test) => void): this; - addListener(event: "pending", listener: (test: Test) => void): this; - removeListener(event: "pending", listener: (test: Test) => void): this; - prependListener(event: "pending", listener: (test: Test) => void): this; - prependOnceListener(event: "pending", listener: (test: Test) => void): this; - emit(name: "pending", test: Test): boolean; - } - // #endregion Runner "pending" event - // #region Runner untyped events - interface Runner extends NodeJS.EventEmitter { - on(event: string, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - emit(name: string, ...args: any[]): boolean; - } - // #endregion Runner untyped events - - /** - * Initialize a new `Suite` with the given `title` and `ctx`. - * - * @see https://mochajs.org/api/Mocha.Suite.html - */ - class Suite { - private _beforeEach; - private _beforeAll; - private _afterEach; - private _afterAll; - private _timeout; - private _enableTimeouts; - private _slow; - private _bail; - private _retries; - private _onlyTests; - private _onlySuites; - - constructor(title: string, parentContext?: Context); - /** @deprecated Use the overload that accepts `Mocha.Context` instead. */ - constructor(title: string, parentContext?: IContext); - - ctx: Context; - suites: Suite[]; - tests: Test[]; - pending: boolean; - file?: string; - root: boolean; - delayed: boolean; - parent: Suite | undefined; - title: string; - - /** - * Create a new `Suite` with the given `title` and parent `Suite`. When a suite - * with the same title is already present, that suite is returned to provide - * nicer reporter and more flexible meta-testing. - * - * @see https://mochajs.org/api/mocha#.exports.create - */ - static create(parent: Suite, title: string): Suite; - /** @deprecated Use the overload that accepts `Mocha.Suite` instead. */ - static create(parent: ISuite, title: string): Suite; - - /** - * Return a clone of this `Suite`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#clone - */ - clone(): Suite; - - /** - * Get timeout `ms`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#timeout - */ - timeout(): number; - - /** - * Set timeout `ms` or short-hand such as "2s". - * - * @see https://mochajs.org/api/Mocha.Suite.html#timeout - */ - timeout(ms: string | number): this; - - /** - * Get number of times to retry a failed test. - * - * @see https://mochajs.org/api/Mocha.Suite.html#retries - */ - retries(): number; - - /** - * Set number of times to retry a failed test. - * - * @see https://mochajs.org/api/Mocha.Suite.html#retries - */ - retries(n: string | number): this; - - /** - * Get whether timeouts are enabled. - * - * @see https://mochajs.org/api/Mocha.Suite.html#enableTimeouts - */ - enableTimeouts(): boolean; - - /** - * Set whether timeouts are `enabled`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#enableTimeouts - */ - enableTimeouts(enabled: boolean): this; - - /** - * Get slow `ms`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#slow - */ - slow(): number; - - /** - * Set slow `ms` or short-hand such as "2s". - * - * @see https://mochajs.org/api/Mocha.Suite.html#slow - */ - slow(ms: string | number): this; - - /** - * Get whether to bail after first error. - * - * @see https://mochajs.org/api/Mocha.Suite.html#bail - */ - bail(): boolean; - - /** - * Set whether to bail after first error. - * - * @see https://mochajs.org/api/Mocha.Suite.html#bail - */ - bail(bail: boolean): this; - - /** - * Check if this suite or its parent suite is marked as pending. - * - * @see https://mochajs.org/api/Mocha.Suite.html#isPending - */ - isPending(): boolean; - - /** - * Run `fn(test[, done])` before running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll - */ - beforeAll(fn?: Func): this; - - /** - * Run `fn(test[, done])` before running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll - */ - beforeAll(fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` before running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll - */ - beforeAll(title: string, fn?: Func): this; - - /** - * Run `fn(test[, done])` before running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll - */ - beforeAll(title: string, fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` after running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterAll - */ - afterAll(fn?: Func): this; - - /** - * Run `fn(test[, done])` after running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterAll - */ - afterAll(fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` after running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterAll - */ - afterAll(title: string, fn?: Func): this; - - /** - * Run `fn(test[, done])` after running tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterAll - */ - afterAll(title: string, fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` before each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach - */ - beforeEach(fn?: Func): this; - - /** - * Run `fn(test[, done])` before each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach - */ - beforeEach(fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` before each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach - */ - beforeEach(title: string, fn?: Func): this; - - /** - * Run `fn(test[, done])` before each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach - */ - beforeEach(title: string, fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` after each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterEach - */ - afterEach(fn?: Func): this; - - /** - * Run `fn(test[, done])` after each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterEach - */ - afterEach(fn?: AsyncFunc): this; - - /** - * Run `fn(test[, done])` after each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterEach - */ - afterEach(title: string, fn?: Func): this; - - /** - * Run `fn(test[, done])` after each test case. - * - * @see https://mochajs.org/api/Mocha.Suite.html#afterEach - */ - afterEach(title: string, fn?: AsyncFunc): this; - - /** - * Add a test `suite`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#addSuite - */ - addSuite(suite: Suite): this; - /** @deprecated Use the overload that accepts `Mocha.ISuite` instead. */ - addSuite(suite: ISuite): this; - - /** - * Add a `test` to this suite. - * - * @see https://mochajs.org/api/Mocha.Suite.html#addTest - */ - addTest(test: Test): this; - /** @deprecated Use the overload that accepts `Mocha.ITest` instead. */ - addTest(test: ITest): this; - - /** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle - */ - fullTitle(): string; - - /** - * Return the title path generated by recursively concatenating the parent's - * title path. - * - * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath - */ - titlePath(): string[]; - - /** - * Return the total number of tests. - * - * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#total - */ - total(): number; - - /** - * Iterates through each suite recursively to find all tests. Applies a - * function in the format `fn(test)`. - * - * @see https://mochajs.org/api/Mocha.Suite.html#eachTest - */ - eachTest(fn: (test: Test) => void): this; - - /** - * This will run the root suite if we happen to be running in delayed mode. - * - * @see https://mochajs.org/api/Mocha.Suite.html#run - */ - run(): void; - - /** - * Generic hook-creator. - */ - protected _createHook(title: string, fn?: Func | AsyncFunc): Hook; - } - - // #region Suite "beforeAll" event - interface Suite extends NodeJS.EventEmitter { - on(event: "beforeAll", listener: (hook: Hook) => void): this; - once(event: "beforeAll", listener: (hook: Hook) => void): this; - addListener(event: "beforeAll", listener: (hook: Hook) => void): this; - removeListener(event: "beforeAll", listener: (hook: Hook) => void): this; - prependListener(event: "beforeAll", listener: (hook: Hook) => void): this; - prependOnceListener(event: "beforeAll", listener: (hook: Hook) => void): this; - emit(name: "beforeAll", hook: Hook): boolean; - } - // #endregion Suite "beforeAll" event - // #region Suite "afterAll" event - interface Suite extends NodeJS.EventEmitter { - on(event: "afterAll", listener: (hook: Hook) => void): this; - once(event: "afterAll", listener: (hook: Hook) => void): this; - addListener(event: "afterAll", listener: (hook: Hook) => void): this; - removeListener(event: "afterAll", listener: (hook: Hook) => void): this; - prependListener(event: "afterAll", listener: (hook: Hook) => void): this; - prependOnceListener(event: "afterAll", listener: (hook: Hook) => void): this; - emit(name: "afterAll", hook: Hook): boolean; - } - // #endregion Suite "afterAll" event - // #region Suite "beforeEach" event - interface Suite extends NodeJS.EventEmitter { - on(event: "beforeEach", listener: (hook: Hook) => void): this; - once(event: "beforeEach", listener: (hook: Hook) => void): this; - addListener(event: "beforeEach", listener: (hook: Hook) => void): this; - removeListener(event: "beforeEach", listener: (hook: Hook) => void): this; - prependListener(event: "beforeEach", listener: (hook: Hook) => void): this; - prependOnceListener(event: "beforeEach", listener: (hook: Hook) => void): this; - emit(name: "beforeEach", hook: Hook): boolean; - } - // #endregion Suite "beforeEach" event - // #region Suite "afterEach" event - interface Suite extends NodeJS.EventEmitter { - on(event: "afterEach", listener: (hook: Hook) => void): this; - once(event: "afterEach", listener: (hook: Hook) => void): this; - addListener(event: "afterEach", listener: (hook: Hook) => void): this; - removeListener(event: "afterEach", listener: (hook: Hook) => void): this; - prependListener(event: "afterEach", listener: (hook: Hook) => void): this; - prependOnceListener(event: "afterEach", listener: (hook: Hook) => void): this; - emit(name: "afterEach", hook: Hook): boolean; - } - // #endregion Suite "afterEach" event - // #region Suite "suite" event - interface Suite extends NodeJS.EventEmitter { - on(event: "suite", listener: (suite: Suite) => void): this; - once(event: "suite", listener: (suite: Suite) => void): this; - addListener(event: "suite", listener: (suite: Suite) => void): this; - removeListener(event: "suite", listener: (suite: Suite) => void): this; - prependListener(event: "suite", listener: (suite: Suite) => void): this; - prependOnceListener(event: "suite", listener: (suite: Suite) => void): this; - emit(name: "suite", suite: Suite): boolean; - } - // #endregion Suite "suite" event - // #region Suite "test" event - interface Suite { - on(event: "test", listener: (test: Test) => void): this; - once(event: "test", listener: (test: Test) => void): this; - addListener(event: "test", listener: (test: Test) => void): this; - removeListener(event: "test", listener: (test: Test) => void): this; - prependListener(event: "test", listener: (test: Test) => void): this; - prependOnceListener(event: "test", listener: (test: Test) => void): this; - emit(name: "test", test: Test): boolean; - } - // #endregion Suite "test" event - // #region Suite "run" event - interface Suite extends NodeJS.EventEmitter { - on(event: "run", listener: () => void): this; - once(event: "run", listener: () => void): this; - addListener(event: "run", listener: () => void): this; - removeListener(event: "run", listener: () => void): this; - prependListener(event: "run", listener: () => void): this; - prependOnceListener(event: "run", listener: () => void): this; - emit(name: "run"): boolean; - } - // #endregion Suite "run" event - // #region Suite "pre-require" event - interface Suite extends NodeJS.EventEmitter { - on(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - once(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - addListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - removeListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - prependListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - prependOnceListener(event: "pre-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - emit(name: "pre-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; - } - // #endregion Suite "pre-require" event - // #region Suite "require" event - interface Suite extends NodeJS.EventEmitter { - on(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - once(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - addListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - removeListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - prependListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - prependOnceListener(event: "require", listener: (module: any, file: string, mocha: Mocha) => void): this; - emit(name: "require", module: any, file: string, mocha: Mocha): boolean; - } - // #endregion Suite "require" event - // #region Suite "post-require" event - interface Suite extends NodeJS.EventEmitter { - on(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - once(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - addListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - removeListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - prependListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - prependOnceListener(event: "post-require", listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this; - emit(name: "post-require", context: MochaGlobals, file: string, mocha: Mocha): boolean; - } - // #endregion Suite "post-require" event - // #region Suite untyped events - interface Suite extends NodeJS.EventEmitter { - on(event: string, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - emit(name: string, ...args: any[]): boolean; - } - // #endregion Runner untyped events - - /** - * Initialize a new `Hook` with the given `title` and callback `fn` - * - * @see https://mochajs.org/api/Hook.html - */ - class Hook extends Runnable { - private _error; - - type: "hook"; - originalTitle?: string; // added by Runner - - /** - * Get the test `err`. - * - * @see https://mochajs.org/api/Hook.html#error - */ - error(): any; - - /** - * Set the test `err`. - * - * @see https://mochajs.org/api/Hook.html#error - */ - error(err: any): void; - } - - /** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @see https://mochajs.org/api/Test.html - */ - class Test extends Runnable { - type: "test"; - speed?: "slow" | "medium" | "fast"; // added by reporters - err?: Error; // added by reporters - clone(): Test; - } - - /** - * Test statistics - */ - interface Stats { - suites: number; - tests: number; - passes: number; - pending: number; - failures: number; - start?: Date; - end?: Date; - duration?: number; - } - - type TestInterface = (suite: Suite) => void; - - interface ReporterConstructor { - new (runner: Runner, options: MochaOptions): reporters.Base; - } - - type Done = (err?: any) => void; - - /** - * Callback function used for tests and hooks. - */ - type Func = (this: Context, done: Done) => void; - - /** - * Async callback function used for tests and hooks. - */ - type AsyncFunc = (this: Context) => PromiseLike; - - /** - * Options to pass to Mocha. - */ - interface MochaOptions { - /** Test interfaces ("bdd", "tdd", "exports", etc.). */ - ui?: Interface; - - /** - * Reporter constructor, built-in reporter name, or reporter module path. Defaults to - * `"spec"`. - */ - reporter?: string | ReporterConstructor; - - /** Options to pass to the reporter. */ - reporterOptions?: any; - - /** Array of accepted globals. */ - globals?: string[]; - - /** timeout in milliseconds. */ - timeout?: number; - - enableTimeouts?: boolean; - - /** number of times to retry failed tests. */ - retries?: number; - - /** bail on the first test failure. */ - bail?: boolean; - - /** milliseconds to wait before considering a test slow. */ - slow?: number; - - /** ignore global leaks. */ - ignoreLeaks?: boolean; - - /** display the full stack trace on failure. */ - fullStackTrace?: boolean; - - /** string or regexp to filter tests with. */ - grep?: string | RegExp; - - /** Enable growl support. */ - growl?: boolean; - - /** Emit color output. */ - useColors?: boolean; - - /** Use inline diffs rather than +/-. */ - inlineDiffs?: boolean; - - /** Do not show diffs at all. */ - hideDiff?: boolean; - - asyncOnly?: boolean; - delay?: boolean; - forbidOnly?: boolean; - forbidPending?: boolean; - noHighlighting?: boolean; - allowUncaught?: boolean; - } - - interface MochaInstanceOptions extends MochaOptions { - files?: string[]; - } - - /** - * Variables added to the global scope by Mocha when run in the CLI. - */ - interface MochaGlobals { - /** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ - before: HookFunction; - - /** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ - after: HookFunction; - - /** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ - beforeEach: HookFunction; - - /** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ - afterEach: HookFunction; - - /** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ - describe: SuiteFunction; - - /** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ - context: SuiteFunction; - - /** - * Pending suite. - * - * - _Only available when invoked via the mocha CLI._ - */ - xdescribe: PendingSuiteFunction; - - /** - * Pending suite. - * - * - _Only available when invoked via the mocha CLI._ - */ - xcontext: PendingSuiteFunction; - - /** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - it: TestFunction; - - /** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - specify: TestFunction; - - /** - * Describes a pending test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - xit: PendingTestFunction; - - /** - * Describes a pending test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - xspecify: PendingTestFunction; - - /** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ - suiteSetup: HookFunction; - - /** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ - suiteTeardown: HookFunction; - - /** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ - setup: HookFunction; - - /** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ - teardown: HookFunction; - - /** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ - suite: SuiteFunction; - - /** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ - test: TestFunction; - - run: typeof run; - } - - /** - * Third-party declarations that want to add new entries to the `Reporter` union can - * contribute names here. - */ - interface ReporterContributions { - Base: never; - base: never; - Dot: never; - dot: never; - TAP: never; - tap: never; - JSON: never; - json: never; - HTML: never; - html: never; - List: never; - list: never; - Min: never; - min: never; - Spec: never; - spec: never; - Nyan: never; - nyan: never; - XUnit: never; - xunit: never; - Markdown: never; - markdown: never; - Progress: never; - progress: never; - Landing: never; - landing: never; - JSONStream: never; - "json-stream": never; - } - - type Reporter = keyof ReporterContributions; - - /** - * Third-party declarations that want to add new entries to the `Interface` union can - * contribute names here. - */ - interface InterfaceContributions { - bdd: never; - tdd: never; - qunit: never; - exports: never; - } - - type Interface = keyof InterfaceContributions; - - // #region Deprecations - - /** @deprecated use `Mocha.Context` instead. */ - interface IContext { - test?: IRunnable; - runnable(): IRunnable | undefined; - /** @deprecated `.runnable()` returns `this` in `Mocha.Context`. */ - runnable(runnable: IRunnable): IContext; - timeout(): number; - /** @deprecated `.timeout()` returns `this` in `Mocha.Context`. */ - timeout(timeout: number): IContext; - /** @deprecated `.enableTimeouts()` has additional overloads in `Mocha.Context`. */ - /** @deprecated `.enableTimeouts()` returns `this` in `Mocha.Context`. */ - enableTimeouts(enableTimeouts: boolean): IContext; - /** @deprecated `.slow()` has additional overloads in `Mocha.Context`. */ - /** @deprecated `.slow()` returns `this` in `Mocha.Context`. */ - slow(slow: number): IContext; - /** @deprecated `.skip()` returns `never` in `Mocha.Context`. */ - skip(): IContext; - retries(): number; - /** @deprecated `.retries()` returns `this` in `Mocha.Context`. */ - retries(retries: number): IContext; - } - - /** @deprecated use `Mocha.Suite` instead. */ - interface ISuiteCallbackContext { - /** @deprecated `.timeout()` has additional overloads in `Mocha.Suite`. */ - timeout(ms: number | string): this; - /** @deprecated `.retries()` has additional overloads in `Mocha.Suite`. */ - retries(n: number): this; - /** @deprecated `.slow()` has additional overloads in `Mocha.Suite`. */ - slow(ms: number): this; - } - - /** @deprecated use `Mocha.Context` instead. */ - interface IHookCallbackContext { - /** @deprecated `.skip()` returns `never` in `Mocha.Context`. */ - skip(): this; - /** @deprecated `.timeout()` has additional overloads in `Mocha.Context`. */ - timeout(ms: number | string): this; - [index: string]: any; - } - - /** @deprecated use `Mocha.Context` instead. */ - interface ITestCallbackContext { - /** @deprecated `.skip()` returns `never` in `Mocha.Context`. */ - skip(): this; - /** @deprecated `.timeout()` has additional overloads in `Mocha.Context`. */ - timeout(ms: number | string): this; - /** @deprecated `.retries()` has additional overloads in `Mocha.Context`. */ - retries(n: number): this; - /** @deprecated `.slow()` has additional overloads in `Mocha.Context`. */ - slow(ms: number): this; - [index: string]: any; - } - - /** Partial interface for Mocha's `Runnable` class. */ - /** @deprecated use `Mocha.Runnable` instead. */ - interface IRunnable extends NodeJS.EventEmitter { - title: string; - /** @deprecated `.fn` has type `Func | AsyncFunc` in `Mocha.Runnable`. */ - fn: Function | undefined; - async: boolean; - sync: boolean; - timedOut: boolean; - /** @deprecated `.timeout()` has additional overloads in `Mocha.Runnable`. */ - timeout(n: number | string): this; - duration?: number; - } - - /** Partial interface for Mocha's `Suite` class. */ - /** @deprecated use `Mocha.Suite` instead. */ - interface ISuite { - /** @deprecated `.ctx` has type `Mocha.Context` in `Mocha.Suite`. */ - ctx: IContext; - /** @deprecated `.parent` has type `Mocha.Suite | undefined` in `Mocha.Suite`. */ - parent: ISuite | undefined; - root: boolean; - title: string; - /** @deprecated `.suites` has type `Mocha.Suite[]` in `Mocha.Suite`. */ - suites: ISuite[]; - /** @deprecated `.tests` has type `Mocha.Test[]` in `Mocha.Suite`. */ - tests: ITest[]; - - bail(): boolean; - /** @deprecated `.bail()` returns `this` in `Mocha.Suite`. */ - bail(bail: boolean): ISuite; - fullTitle(): string; - retries(): number; - /** @deprecated `.retries()` returns `this` in `Mocha.Suite`. */ - retries(retries: number): ISuite; - slow(): number; - /** @deprecated `.slow()` returns `this` in `Mocha.Suite`. */ - slow(slow: number): ISuite; - timeout(): number; - /** @deprecated `.timeout()` returns `this` in `Mocha.Suite`. */ - timeout(timeout: number): ISuite; - } - - /** Partial interface for Mocha's `Test` class. */ - /** @deprecated use `Mocha.Test` instead. */ - interface ITest extends IRunnable { - body?: string; - file?: string; - /** @deprecated `.parent` has type `Mocha.Suite | undefined` in `Mocha.Test`. */ - parent?: ISuite; - pending: boolean; - state?: 'failed' | 'passed'; - type: 'test'; - fullTitle(): string; - } - - /** @deprecated use `Mocha.Hook` instead. */ - interface IHook extends IRunnable { - /** @deprecated `.ctx` has type `Mocha.Context` in `Mocha.Runnable`. */ - ctx?: IContext; - /** @deprecated `.parent` has type `Mocha.Suite` in `Mocha.Runnable`. */ - parent?: ISuite; - type: 'hook'; - /** @deprecated `.error()` has additional overloads in `Mocha.Hook`. */ - error(err: Error): void; - } - - /** @deprecated use `Mocha.Context` instead. */ - interface IBeforeAndAfterContext extends IHookCallbackContext { - /** @deprecated `.currentTest` has type `Mocha.Test` in `Mocha.Context`. */ - currentTest?: ITest; - } - - /** @deprecated use `Mocha.Stats` instead. */ - type IStats = Stats; - - /** Partial interface for Mocha's `Runner` class. */ - /** @deprecated use `Mocha.Runner` instead. */ - interface IRunner extends NodeJS.EventEmitter { - asyncOnly?: boolean; - stats?: IStats; - started: boolean; - /** @deprecated `.suite` has type `Mocha.Suite` in `Mocha.Runner`. */ - suite: ISuite; - total: number; - failures: number; - forbidOnly?: boolean; - forbidPending?: boolean; - fullStackTrace?: boolean; - ignoreLeaks?: boolean; - grep(re: RegExp, invert: boolean): this; - /** @deprecated Parameter `suite` has type `Mocha.Suite` in `Mocha.Runner`. */ - grepTotal(suite: ISuite): number; - /** @deprecated `.globals()` has different overloads in `Mocha.Runner`. */ - globals(arr: ReadonlyArray): this | string[]; - abort(): this; - run(fn?: (failures: number) => void): this; - } - - /** @deprecated use `Mocha.SuiteFunction` instead. */ - interface IContextDefinition { - /** @deprecated use `Mocha.SuiteFunction` instead. */ - (description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; - /** @deprecated use `Mocha.SuiteFunction` instead. */ - only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; - /** @deprecated use `Mocha.SuiteFunction` instead. */ - skip(description: string, callback: (this: ISuiteCallbackContext) => void): void; - } - - /** @deprecated use `Mocha.TestFunction` instead. */ - interface ITestDefinition { - /** @deprecated use `Mocha.TestFunction` instead. */ - /** @deprecated `Mocha.TestFunction` does not allow mixing `done` with a return type of `PromiseLike`. */ - (expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): ITest; - /** @deprecated use `Mocha.TestFunction` instead. */ - /** @deprecated `Mocha.TestFunction#only` does not allow mixing `done` with a return type of `PromiseLike`. */ - only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): ITest; - /** @deprecated use `Mocha.TestFunction` instead. */ - /** @deprecated `Mocha.TestFunction#skip` does not allow mixing `done` with a return type of `PromiseLike`. */ - skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): void; - } - - // #endregion -} - -// #region Test interface augmentations - -/** - * Triggers root suite execution. - * - * - _Only available if flag --delay is passed into Mocha._ - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#runWithSuite - */ -declare function run(): void; - -/** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ -declare var before: Mocha.HookFunction; - -/** - * Execute before running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#before - */ -declare var suiteSetup: Mocha.HookFunction; - -/** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ -declare var after: Mocha.HookFunction; - -/** - * Execute after running tests. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#after - */ -declare var suiteTeardown: Mocha.HookFunction; - -/** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ -declare var beforeEach: Mocha.HookFunction; - -/** - * Execute before each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#beforeEach - */ -declare var setup: Mocha.HookFunction; - -/** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ -declare var afterEach: Mocha.HookFunction; - -/** - * Execute after each test case. - * - * - _Only available when invoked via the mocha CLI._ - * - * @see https://mochajs.org/api/global.html#afterEach - */ -declare var teardown: Mocha.HookFunction; - -/** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var describe: Mocha.SuiteFunction; - -/** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var context: Mocha.SuiteFunction; - -/** - * Describe a "suite" containing nested suites and tests. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var suite: Mocha.SuiteFunction; - -/** - * Pending suite. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var xdescribe: Mocha.PendingSuiteFunction; - -/** - * Pending suite. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var xcontext: Mocha.PendingSuiteFunction; - -/** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var it: Mocha.TestFunction; - -/** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var specify: Mocha.TestFunction; - -/** - * Describes a test case. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var test: Mocha.TestFunction; - -/** - * Describes a pending test case. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var xit: Mocha.PendingTestFunction; - -/** - * Describes a pending test case. - * - * - _Only available when invoked via the mocha CLI._ - */ -declare var xspecify: Mocha.PendingTestFunction; - -// #endregion Test interface augmentations - -// #region Reporter augmentations - -// Forward declaration for `HTMLLIElement` from lib.dom.d.ts. -// Required by Mocha.reporters.HTML. -// NOTE: Mocha *must not* have a direct dependency on DOM types. -// tslint:disable-next-line no-empty-interface -interface HTMLLIElement { } - -// Augments the DOM `Window` object when lib.dom.d.ts is loaded. -// tslint:disable-next-line no-empty-interface -interface Window extends Mocha.MochaGlobals { } - -declare namespace NodeJS { - // Forward declaration for `NodeJS.EventEmitter` from node.d.ts. - // Required by Mocha.Runnable, Mocha.Runner, and Mocha.Suite. - // NOTE: Mocha *must not* have a direct dependency on @types/node. - // tslint:disable-next-line no-empty-interface - interface EventEmitter { } - - // Augments NodeJS's `global` object when node.d.ts is loaded - // tslint:disable-next-line no-empty-interface - interface Global extends Mocha.MochaGlobals { } -} - -// #endregion Reporter augmentations - -// #region Browser augmentations - -/** - * Mocha global. - * - * - _Only supported in the browser._ - */ -declare const mocha: BrowserMocha; - -interface BrowserMocha extends Mocha { - /** - * Function to allow assertion libraries to throw errors directly into mocha. - * This is useful when running tests in a browser because window.onerror will - * only receive the 'message' attribute of the Error. - * - * - _Only supported in the browser._ - */ - throwError(err: any): never; - - /** - * Setup mocha with the given settings options. - * - * - _Only supported in the browser._ - */ - setup(opts?: Mocha.Interface | MochaSetupOptions): this; -} - -/** - * Options to pass to `mocha.setup` in the browser. - */ -interface MochaSetupOptions extends Mocha.MochaOptions { - /** @deprecated This is not used by Mocha. Use `files` instead. */ - require?: string[]; - fullTrace?: boolean; -} - -// #endregion Browser augmentations - -// #region Deprecations - -/** @deprecated use `Mocha.Done` instead. */ -type MochaDone = Mocha.Done; - -/** @deprecated use `Mocha.ReporterConstructor` instead. */ -type ReporterConstructor = Mocha.ReporterConstructor; - -// #endregion Deprecations - -declare module "mocha" { - export = Mocha; -} - -declare module "mocha/lib/ms" { - export = milliseconds; - /** - * Parse the given `str` and return milliseconds. - * - * @see {@link https://mochajs.org/api/module-milliseconds.html} - * @see {@link https://mochajs.org/api/module-milliseconds.html#~parse} - */ - function milliseconds(val: string): number; - - /** - * Format for `ms`. - * - * @see {@link https://mochajs.org/api/module-milliseconds.html} - * @see {@link https://mochajs.org/api/module-milliseconds.html#~format} - */ - function milliseconds(val: number): string; -} - -declare module "mocha/lib/interfaces/common" { - export = common; - - function common(suites: Mocha.Suite[], context: Mocha.MochaGlobals, mocha: Mocha): common.CommonFunctions; - - namespace common { - interface CommonFunctions { - /** - * This is only present if flag --delay is passed into Mocha. It triggers - * root suite execution. - */ - runWithSuite(suite: Mocha.Suite): () => void; - - /** - * Execute before running tests. - */ - before(fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute before running tests. - */ - before(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute after running tests. - */ - after(fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute after running tests. - */ - after(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute before each test case. - */ - beforeEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute before each test case. - */ - beforeEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute after each test case. - */ - afterEach(fn?: Mocha.Func | Mocha.AsyncFunc): void; - - /** - * Execute after each test case. - */ - afterEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void; - - suite: SuiteFunctions; - test: TestFunctions; - } - - interface CreateOptions { - /** Title of suite */ - title: string; - - /** Suite function */ - fn?: (this: Mocha.Suite) => void; - - /** Is suite pending? */ - pending?: boolean; - - /** Filepath where this Suite resides */ - file?: string; - - /** Is suite exclusive? */ - isOnly?: boolean; - } - - interface SuiteFunctions { - /** - * Create an exclusive Suite; convenience function - */ - only(opts: CreateOptions): Mocha.Suite; - - /** - * Create a Suite, but skip it; convenience function - */ - skip(opts: CreateOptions): Mocha.Suite; - - /** - * Creates a suite. - */ - create(opts: CreateOptions): Mocha.Suite; - } - - interface TestFunctions { - /** - * Exclusive test-case. - */ - only(mocha: Mocha, test: Mocha.Test): Mocha.Test; - - /** - * Pending test case. - */ - skip(title: string): void; - - /** - * Number of retry attempts - */ - retries(n: number): void; - } - } -} diff --git a/node_modules/@types/mocha/package.json b/node_modules/@types/mocha/package.json deleted file mode 100644 index f991cb3..0000000 --- a/node_modules/@types/mocha/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "@types/mocha@5.2.7", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/mocha@5.2.7", - "_id": "@types/mocha@5.2.7", - "_inBundle": false, - "_integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", - "_location": "/@types/mocha", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/mocha@5.2.7", - "name": "@types/mocha", - "escapedName": "@types%2fmocha", - "scope": "@types", - "rawSpec": "5.2.7", - "saveSpec": null, - "fetchSpec": "5.2.7" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", - "_spec": "5.2.7", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Kazi Manzur Rashid", - "url": "https://github.com/kazimanzurrashid" - }, - { - "name": "otiai10", - "url": "https://github.com/otiai10" - }, - { - "name": "jt000", - "url": "https://github.com/jt000" - }, - { - "name": "Vadim Macagon", - "url": "https://github.com/enlight" - }, - { - "name": "Andrew Bradley", - "url": "https://github.com/cspotcode" - }, - { - "name": "Dmitrii Sorin", - "url": "https://github.com/1999" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for mocha", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/mocha", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/mocha" - }, - "scripts": {}, - "typeScriptVersion": "2.1", - "types": "index", - "typesPublisherContentHash": "c1da64ed19c05073426a3b86ee04ba2b1e743c51422ebf1b3d022b7be11b75f1", - "version": "5.2.7" -} diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE deleted file mode 100644 index 2107107..0000000 --- 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 74d7f1e..0000000 --- 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/v10 - -Additional Details - * Last updated: Fri, 17 May 2019 21:14:16 GMT - * Dependencies: none - * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout - -# Credits -These definitions were written by Microsoft TypeScript , DefinitelyTyped , Alberto Schiabel , Alexander T. , Alvis HT Tang , Andrew Makarov , Bruno Scheufler , Chigozirim C. , Christian Vaagland Tellnes , 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 , Jeremie Rodriguez , Samuel Ainsworth , Kyle Uehlein , Jordi Oliveras Rovira , Thanik Bhongbhibhat . diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts deleted file mode 100644 index d73353c..0000000 --- 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: Function, message?: string | Error): void; - function throws(block: Function, error: RegExp | Function | Object | Error, message?: string | Error): void; - function doesNotThrow(block: Function, message?: string | Error): void; - function doesNotThrow(block: Function, error: RegExp | Function, message?: string | Error): void; - - function ifError(value: any): void; - - function rejects(block: Function | Promise, message?: string | Error): Promise; - function rejects(block: Function | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; - function doesNotReject(block: Function | Promise, message?: string | Error): Promise; - function doesNotReject(block: Function | 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 2c77932..0000000 --- a/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,144 +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 AsyncHooks before callbacks. - * @deprecated since 9.6 - Use asyncResource.runInAsyncScope() instead. - */ - emitBefore(): void; - - /** - * Call AsyncHooks after callbacks. - * @deprecated since 9.6 - Use asyncResource.runInAsyncScope() instead. - */ - emitAfter(): void; - - /** - * 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 70983d9..0000000 --- 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 0fe668b..0000000 --- a/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare module "buffer" { - export const INSPECT_MAX_BYTES: number; - const BuffType: typeof Buffer; - - export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; - - export function transcode(source: Buffer | 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 442e8ae..0000000 --- a/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,359 +0,0 @@ -declare module "child_process" { - import * as events from "events"; - import * as stream from "stream"; - import * as net from "net"; - - interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; - stdout: stream.Readable; - stderr: stream.Readable; - stdio: [stream.Writable, stream.Readable, stream.Readable]; - killed: boolean; - pid: number; - kill(signal?: string): void; - send(message: any, callback?: (error: Error) => void): boolean; - send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean; - send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error) => void): boolean; - connected: 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; - } - - interface MessageOptions { - keepOpen?: boolean; - } - - type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | stream.Stream | number | null | undefined)>; - - interface SpawnOptions { - cwd?: string; - env?: NodeJS.ProcessEnv; - argv0?: string; - stdio?: StdioOptions; - detached?: boolean; - uid?: number; - gid?: number; - shell?: boolean | string; - windowsVerbatimArguments?: boolean; - windowsHide?: boolean; - } - - function spawn(command: string, options?: SpawnOptions): ChildProcess; - function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptions): ChildProcess; - - interface ExecOptions { - cwd?: string; - env?: NodeJS.ProcessEnv; - shell?: string; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - windowsHide?: boolean; - } - - 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; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace exec { - function __promisify__(command: string): Promise<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): Promise<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): Promise<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: ExecOptions): Promise<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ExecFileOptions { - cwd?: string; - env?: NodeJS.ProcessEnv; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - windowsHide?: boolean; - windowsVerbatimArguments?: boolean; - } - 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): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__(file: string, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__( - file: string, - args: string[] | undefined | null, - options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, - ): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ForkOptions { - cwd?: string; - env?: NodeJS.ProcessEnv; - execPath?: string; - execArgv?: string[]; - silent?: boolean; - stdio?: StdioOptions; - detached?: boolean; - windowsVerbatimArguments?: boolean; - uid?: number; - gid?: number; - } - function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; - - interface SpawnSyncOptions { - argv0?: string; // Not specified in the docs - cwd?: string; - input?: string | Buffer | NodeJS.TypedArray | DataView; - stdio?: StdioOptions; - env?: NodeJS.ProcessEnv; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - shell?: boolean | string; - windowsVerbatimArguments?: boolean; - windowsHide?: 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; - signal: string; - 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 { - cwd?: string; - input?: string | Buffer | Uint8Array; - stdio?: StdioOptions; - env?: NodeJS.ProcessEnv; - shell?: string; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - windowsHide?: boolean; - } - 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 { - cwd?: string; - input?: string | Buffer | NodeJS.TypedArray | DataView; - stdio?: StdioOptions; - env?: NodeJS.ProcessEnv; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - windowsHide?: boolean; - 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 2bfe353..0000000 --- a/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,261 +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; - suicide: boolean; - send(message: any, sendHandle?: any, callback?: (error: Error) => 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?: Function): 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: any) => 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: any): 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: any) => 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: any) => 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: any) => 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: any) => void): this; - } - - function disconnect(callback?: Function): 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: any) => 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: any): 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: any) => 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: any) => 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: any) => 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: any) => 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 d30d13f..0000000 --- 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 6c39d64..0000000 --- a/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,279 +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 NPN_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; - 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 0d37716..0000000 --- a/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,369 +0,0 @@ -declare module "crypto" { - import * as stream from "stream"; - - interface Certificate { - exportChallenge(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer; - exportPublicKey(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer; - verifySpkac(spkac: Buffer | NodeJS.TypedArray | DataView): boolean; - } - const Certificate: { - new(): Certificate; - (): Certificate; - }; - - /** @deprecated since v10.0.0 */ - const fips: boolean; - - interface CredentialDetails { - pfx: string; - key: string; - passphrase: string; - cert: string; - ca: string | string[]; - crl: string | string[]; - ciphers: string; - } - interface Credentials { context?: any; } - function createCredentials(details: CredentialDetails): Credentials; - function createHash(algorithm: string, options?: stream.TransformOptions): Hash; - function createHmac(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, 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"; - - interface Hash extends NodeJS.ReadWriteStream { - update(data: string | Buffer | NodeJS.TypedArray | DataView): Hash; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - interface Hmac extends NodeJS.ReadWriteStream { - update(data: string | Buffer | NodeJS.TypedArray | DataView): Hmac; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm'; - type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; - 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: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): CipherCCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createCipher(algorithm: CipherGCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): CipherGCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createCipher(algorithm: string, password: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Cipher; - - function createCipheriv(algorithm: CipherCCMTypes, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): CipherCCM; - function createCipheriv(algorithm: CipherGCMTypes, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): CipherGCM; - function createCipheriv(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Cipher; - - interface Cipher extends NodeJS.ReadWriteStream { - update(data: string | Buffer | NodeJS.TypedArray | DataView): Buffer; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; - update(data: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64BinaryEncoding): string; - update(data: Buffer | NodeJS.TypedArray | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; - // second arg ignored - update(data: string, input_encoding: Utf8AsciiBinaryEncoding, 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: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): DecipherCCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createDecipher(algorithm: CipherGCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): DecipherGCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createDecipher(algorithm: string, password: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Decipher; - - function createDecipheriv( - algorithm: CipherCCMTypes, - key: string | Buffer | NodeJS.TypedArray | DataView, - iv: string | Buffer | NodeJS.TypedArray | DataView, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: string | Buffer | NodeJS.TypedArray | DataView, - iv: string | Buffer | NodeJS.TypedArray | DataView, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Decipher; - - interface Decipher extends NodeJS.ReadWriteStream { - update(data: Buffer | NodeJS.TypedArray | DataView): Buffer; - update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; - update(data: Buffer | NodeJS.TypedArray | DataView, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; - // second arg is ignored - update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): this; - // setAuthTag(tag: Buffer | NodeJS.TypedArray | DataView): this; - // setAAD(buffer: Buffer | NodeJS.TypedArray | DataView): this; - } - interface DecipherCCM extends Decipher { - setAuthTag(buffer: Buffer | NodeJS.TypedArray | DataView): this; - setAAD(buffer: Buffer | NodeJS.TypedArray | DataView, options: { plaintextLength: number }): this; - } - interface DecipherGCM extends Decipher { - setAuthTag(buffer: Buffer | NodeJS.TypedArray | DataView): this; - setAAD(buffer: Buffer | NodeJS.TypedArray | DataView, options?: { plaintextLength: number }): this; - } - - function createSign(algorithm: string, options?: stream.WritableOptions): Signer; - interface Signer extends NodeJS.WritableStream { - update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }): Buffer; - sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string; - } - function createVerify(algorith: string, options?: stream.WritableOptions): Verify; - interface Verify extends NodeJS.WritableStream { - update(data: string | Buffer | NodeJS.TypedArray | DataView): Verify; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify; - verify(object: string | Object, signature: Buffer | NodeJS.TypedArray | DataView): boolean; - verify(object: string | Object, 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 | Buffer | NodeJS.TypedArray | DataView): DiffieHellman; - function createDiffieHellman(prime: Buffer | NodeJS.TypedArray | DataView): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer | NodeJS.TypedArray | DataView): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; - interface DiffieHellman { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView, 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: Buffer | NodeJS.TypedArray | DataView): void; - setPublicKey(public_key: string, encoding: string): void; - setPrivateKey(private_key: Buffer | NodeJS.TypedArray | DataView): void; - setPrivateKey(private_key: string, encoding: string): void; - verifyError: number; - } - function getDiffieHellman(group_name: string): DiffieHellman; - function pbkdf2( - password: string | Buffer | NodeJS.TypedArray | DataView, - salt: string | Buffer | NodeJS.TypedArray | DataView, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: Buffer) => any, - ): void; - function pbkdf2Sync(password: string | Buffer | NodeJS.TypedArray | DataView, salt: string | Buffer | NodeJS.TypedArray | DataView, 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: string | Buffer | NodeJS.TypedArray | DataView, - salt: string | Buffer | NodeJS.TypedArray | DataView, - keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scrypt( - password: string | Buffer | NodeJS.TypedArray | DataView, - salt: string | Buffer | NodeJS.TypedArray | DataView, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scryptSync(password: string | Buffer | NodeJS.TypedArray | DataView, salt: string | Buffer | NodeJS.TypedArray | DataView, keylen: number, options?: ScryptOptions): Buffer; - - interface RsaPublicKey { - key: string; - padding?: number; - } - interface RsaPrivateKey { - key: string; - passphrase?: string; - padding?: number; - } - function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer; - function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer; - function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer; - function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer; - function getCiphers(): string[]; - function getCurves(): string[]; - function getHashes(): string[]; - class ECDH { - static convertKey( - key: string | Buffer | NodeJS.TypedArray | DataView, - 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: Buffer | NodeJS.TypedArray | DataView): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView, 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: Buffer | NodeJS.TypedArray | DataView): void; - setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; - } - function createECDH(curve_name: string): ECDH; - function timingSafeEqual(a: Buffer | NodeJS.TypedArray | DataView, b: Buffer | NodeJS.TypedArray | DataView): 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 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: '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: '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 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: '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: '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; - - 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: "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: "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 }>; - } -} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index 4b9fe01..0000000 --- a/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -declare module "dgram" { - import { AddressInfo } from "net"; - import * as dns from "dns"; - import * as events from "events"; - - interface RemoteInfo { - address: string; - family: string; - port: number; - } - - interface BindOptions { - port: number; - address?: string; - exclusive?: boolean; - } - - type SocketType = "udp4" | "udp6"; - - interface SocketOptions { - type: SocketType; - reuseAddr?: 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: Buffer | string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; - send(msg: Buffer | 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?: Function): 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: AddressInfo) => 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: AddressInfo): 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: AddressInfo) => 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: AddressInfo) => 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: AddressInfo) => 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: AddressInfo) => 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 f932c13..0000000 --- a/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,292 +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<{ address: LookupAddress[] }>; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>; - function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>; - } - - 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: string[]): 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; - } -} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts deleted file mode 100644 index 6a30dec..0000000 --- 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: Function): void; - add(emitter: events.EventEmitter): void; - remove(emitter: events.EventEmitter): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - members: any[]; - 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 dd0d8d1..0000000 --- a/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -declare module "events" { - class internal extends NodeJS.EventEmitter { } - - namespace internal { - 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 90db179..0000000 --- a/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,2296 +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 = Buffer | 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: { 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: { 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[]; - - /** - * 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 readdirSync(path: PathLike, options: { 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; - }): 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 534c032..0000000 --- a/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,999 +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(): 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; -} - -/*-----------------------------------------------* - * * - * 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; - -// 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; - 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" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; -interface Buffer extends Uint8Array { - constructor: typeof Buffer; - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - 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; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: string): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - keys(): IterableIterator; - values(): IterableIterator; -} - -/** - * 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 const Buffer: { - /** - * 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. - */ - new(str: string, encoding?: string): Buffer; - /** - * 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()`). - */ - new(size: number): Buffer; - /** - * 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. - */ - new(array: Uint8Array): Buffer; - /** - * 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. - */ - new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; - /** - * 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. - */ - new(array: any[]): Buffer; - /** - * 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. - */ - new(buffer: Buffer): Buffer; - prototype: 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() - */ - 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 - */ - from(data: any[]): Buffer; - 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'. - */ - from(str: string, encoding?: string): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - 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. - */ - isEncoding(encoding: string): boolean | undefined; - /** - * 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') - */ - byteLength(string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, encoding?: string): 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. - */ - concat(list: Uint8Array[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - 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 - */ - alloc(size: number, fill?: string | Buffer | number, encoding?: string): 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 - */ - 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 - */ - 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. - */ - poolSize: number; -}; - -/*----------------------------------------------* -* * -* GLOBAL INTERFACES * -* * -*-----------------------------------------------*/ -declare namespace NodeJS { - interface InspectOptions { - showHidden?: boolean; - depth?: number | null; - colors?: boolean; - customInspect?: boolean; - showProxy?: boolean; - maxArrayLength?: number | null; - breakLength?: number; - compact?: boolean; - sorted?: boolean | ((a: string, b: string) => number); - } - - interface ConsoleConstructorOptions { - stdout: WritableStream; - stderr?: WritableStream; - ignoreErrors?: boolean; - colorMode?: boolean | 'auto'; - } - - 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): void; - unshift(chunk: Buffer): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Buffer | string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(cb?: Function): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - interface ReadWriteStream extends ReadableStream, WritableStream { } - - interface Events extends EventEmitter { } - - interface Domain extends Events { - run(fn: Function): void; - add(emitter: Events): void; - remove(emitter: Events): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - - 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: any, 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 writableHighWaterMark: number; - readonly writableLength: number; - columns?: number; - rows?: number; - _write(chunk: any, encoding: string, callback: Function): void; - _destroy(err: Error | null, callback: Function): void; - _final(callback: Function): 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: Function): void; - push(chunk: any, encoding?: string): boolean; - destroy(error?: Error): void; - } - - interface HRTime { - (time?: [number, number]): [number, number]; - } - - interface Process extends EventEmitter { - stdout: WriteStream; - 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; - umask(mask?: number): number; - uptime(): number; - hrtime: HRTime; - domain: Domain; - - // Worker - send?(message: any, sendHandle?: any): void; - 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; - - /** - * 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; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - v8debug?: any; - } - - interface Timer { - ref(): void; - refresh(): void; - unref(): void; - } - - class Immediate { - ref(): void; - unref(): void; - _onImmediate: Function; // to distinguish it from the Timeout class - } - - class Timeout implements Timer { - ref(): void; - refresh(): void; - unref(): void; - } - - 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 cb764e4..0000000 --- a/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,268 +0,0 @@ -declare module "http" { - import * as events from "events"; - import * as net from "net"; - import * as stream from "stream"; - import { URL } from "url"; - - // incoming headers will never contain number - interface IncomingHttpHeaders { - 'accept-patch'?: string; - 'accept-ranges'?: string; - 'accept'?: 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: net.Socket) => void) => net.Socket; - } - - interface ServerOptions { - IncomingMessage?: typeof IncomingMessage; - ServerResponse?: typeof ServerResponse; - } - - type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; - - class Server extends net.Server { - 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: net.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; - - constructor(req: IncomingMessage); - - assignSocket(socket: net.Socket): void; - detachSocket(socket: net.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): void; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void; - } - - // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 - class ClientRequest extends OutgoingMessage { - connection: net.Socket; - socket: net.Socket; - aborted: number; - - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - - readonly path: string; - abort(): void; - onSocket(socket: net.Socket): void; - setTimeout(timeout: number, callback?: () => void): this; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - } - - class IncomingMessage extends stream.Readable { - constructor(socket: net.Socket); - - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - connection: net.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: net.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; - sockets: any; - requests: any; - - 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; - function createClient(port?: number, host?: string): any; - - // 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; -} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts deleted file mode 100644 index 06ebb77..0000000 --- a/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,859 +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 } 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; - streamLocalClose?: number; - streamRemoteClose?: 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; - getTrailers?: (trailers: OutgoingHttpHeaders) => void; - offset?: number; - length?: number; - } - - export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?: (err: NodeJS.ErrnoException) => void; - } - - export interface Http2Stream extends stream.Duplex { - readonly aborted: boolean; - readonly closed: boolean; - readonly destroyed: boolean; - readonly pending: boolean; - readonly rstCode: number; - readonly sentHeaders: OutgoingHttpHeaders; - readonly sentInfoHeaders?: OutgoingHttpHeaders[]; - readonly sentTrailers?: OutgoingHttpHeaders; - readonly session: Http2Session; - readonly state: StreamState; - /** - * 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; - close(code?: number, callback?: () => void): void; - priority(options: StreamPriorityOptions): void; - setTimeout(msecs: number, callback?: () => void): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - 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; - - emit(event: string | symbol, ...args: any[]): boolean; - 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; - - on(event: string, listener: (...args: any[]) => void): this; - 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; - - once(event: string, 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; - - prependListener(event: string, 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; - - prependOnceListener(event: string, 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; - - sendTrailers(headers: OutgoingHttpHeaders): this; - } - - export interface ClientHttp2Stream extends Http2Stream { - addListener(event: string, listener: (...args: any[]) => void): 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; - - emit(event: string | symbol, ...args: any[]): 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; - - on(event: string, listener: (...args: any[]) => void): 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; - - once(event: string, listener: (...args: any[]) => void): 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; - - prependListener(event: string, listener: (...args: any[]) => void): 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; - - prependOnceListener(event: string, listener: (...args: any[]) => void): 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; - } - - export interface ServerHttp2Stream extends Http2Stream { - 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; - } - - export interface ClientSessionRequestOptions { - endStream?: boolean; - exclusive?: boolean; - parent?: number; - weight?: number; - getTrailers?: (trailers: OutgoingHttpHeaders, flags: number) => void; - } - - export interface SessionState { - effectiveLocalWindowSize?: number; - effectiveRecvDataLength?: number; - nextStreamID?: number; - localWindowSize?: number; - lastProcStreamID?: number; - remoteWindowSize?: number; - outboundQueueSize?: number; - deflateDynamicTableSize?: number; - inflateDynamicTableSize?: number; - } - - export interface Http2Session extends events.EventEmitter { - 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; - rstStream(stream: Http2Stream, code?: number): void; - setTimeout(msecs: number, callback?: () => void): void; - readonly socket: net.Socket | tls.TLSSocket; - readonly state: SessionState; - priority(stream: Http2Stream, options: StreamPriorityOptions): void; - settings(settings: Settings): void; - readonly type: number; - unref(): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - 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: "remoteSettings", listener: (settings: Settings) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "ping", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - 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: "remoteSettings", settings: Settings): boolean; - emit(event: "timeout"): boolean; - emit(event: "ping"): 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: "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: "remoteSettings", listener: (settings: Settings) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "ping", listener: () => 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: "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: "remoteSettings", listener: (settings: Settings) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "ping", listener: () => 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: "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: "remoteSettings", listener: (settings: Settings) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "ping", listener: () => 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: "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: "remoteSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "ping", listener: () => void): this; - } - - export interface ClientHttp2Session extends Http2Session { - request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; - emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => 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; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => 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; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => 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; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => 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; - } - - export interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - - export interface ServerHttp2Session extends Http2Session { - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - readonly server: Http2Server | Http2SecureServer; - - addListener(event: string, listener: (...args: any[]) => void): this; - 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - 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; - - once(event: string, 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; - - prependListener(event: string, 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; - - prependOnceListener(event: string, 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; - } - - // Http2Server - - export interface SessionOptions { - maxDeflateDynamicTableSize?: number; - maxReservedRemoteStreams?: number; - maxSendHeaderBlockLength?: number; - paddingStrategy?: number; - peerMaxConcurrentStreams?: number; - selectPadding?: (frameLen: number, maxFrameLen: number) => number; - settings?: Settings; - createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; - } - - export type ClientSessionOptions = SessionOptions; - export type ServerSessionOptions = SessionOptions; - - 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; - } - - export interface Http2Server extends net.Server { - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => 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; - - once(event: string, 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: "sessionError", listener: (err: Error) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "timeout", listener: () => void): this; - - prependListener(event: string, 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: "sessionError", listener: (err: Error) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - - prependOnceListener(event: string, 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: "sessionError", listener: (err: Error) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - - export interface Http2SecureServer extends tls.Server { - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): 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; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => 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; - - once(event: string, 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: "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; - - prependListener(event: string, 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: "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; - - prependOnceListener(event: string, 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: "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; - } - - export class Http2ServerRequest extends stream.Readable { - private constructor(); - headers: IncomingHttpHeaders; - httpVersion: string; - method: string; - rawHeaders: string[]; - rawTrailers: string[]; - setTimeout(msecs: number, callback?: () => void): void; - socket: net.Socket | tls.TLSSocket; - stream: ServerHttp2Stream; - trailers: IncomingHttpHeaders; - url: string; - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "aborted", hadError: boolean, code: number): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - } - - export class Http2ServerResponse extends events.EventEmitter { - private constructor(); - addTrailers(trailers: OutgoingHttpHeaders): void; - connection: net.Socket | tls.TLSSocket; - end(callback?: () => void): void; - end(data?: string | Buffer, callback?: () => void): void; - end(data?: string | Buffer, 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; - socket: net.Socket | tls.TLSSocket; - statusCode: number; - statusMessage: ''; - stream: ServerHttp2Stream; - write(chunk: string | Buffer, callback?: (err: Error) => void): boolean; - write(chunk: string | Buffer, encoding?: string, callback?: (err: Error) => void): boolean; - writeContinue(): void; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void; - writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders): void; - createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "aborted", hadError: boolean, code: number): boolean; - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "finish"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - 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; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: (hadError: boolean, code: number) => 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; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => 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; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => 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; - } - - // 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): Settings; - export function getUnpackedSettings(buf: Buffer | 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 dea042e..0000000 --- a/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,51 +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(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(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 8e650d7..0000000 --- a/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Type definitions for Node.js 10.14 -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript -// DefinitelyTyped -// Alberto Schiabel -// Alexander T. -// Alvis HT Tang -// Andrew Makarov -// Bruno Scheufler -// Chigozirim C. -// Christian Vaagland Tellnes -// 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 -// Jeremie Rodriguez -// Samuel Ainsworth -// Kyle Uehlein -// Jordi Oliveras Rovira -// Thanik Bhongbhibhat -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// NOTE: These definitions support NodeJS and TypeScript 3.1. - -// 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.1/index.d.ts - Definitions specific to TypeScript 3.1 - -// NOTE: Augmentations for TypeScript 3.1 and later should use individual files for overrides -// within the respective ~/ts3.1 (or later) folder. However, this is disallowed for versions -// prior to TypeScript 3.1, 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`) -interface MapConstructor { } -interface WeakMapConstructor { } -interface SetConstructor { } -interface WeakSetConstructor { } -interface Set {} -interface ReadonlySet {} -interface IteratorResult { } -interface Iterable { } -interface Iterator { - next(value?: any): IteratorResult; -} -interface IterableIterator { } -interface AsyncIterableIterator {} -interface SymbolConstructor { - readonly iterator: symbol; - readonly asyncIterator: symbol; -} -declare var Symbol: SymbolConstructor; -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 2dcd276..0000000 --- a/node_modules/@types/node/inspector.d.ts +++ /dev/null @@ -1,3162 +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. - -/** - * 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 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 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 ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: 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; - /** - * Terminate execution after timing out (number of milliseconds). - * @experimental - */ - timeout?: Runtime.TimeDelta; - } - - 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 GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - - 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 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 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 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 SetBreakpointOnFunctionCallParameterType { - /** - * Function object id. - */ - objectId: Runtime.RemoteObjectId; - /** - * Expression to use as a breakpoint condition. When specified, debugger will - * stop on the breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - - 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 SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: 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 StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled - * before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean; - } - - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - - 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 SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - - 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 SetBreakpointOnFunctionCallReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - } - - 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 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; - } - - 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 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; - } - } - - 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 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 GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - } - - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The - * default value is 32768 bytes. - */ - samplingInterval?: number; - } - - 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 GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - - 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[]; - } - - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean; - } - } - - 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 GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - - interface TakeTypeProfileReturnType { - /** - * Type profile for all scripts since startTypeProfile() was turned on. - */ - result: ScriptTypeProfile[]; - } - - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - } - - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - - /** - * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, - * `-Infinity`, and bigint literals. - */ - 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; - - /** - * Number of milliseconds. - */ - type TimeDelta = 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 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 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 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; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - * @experimental - */ - throwOnSideEffect?: boolean; - /** - * Terminate execution after timing out (number of milliseconds). - * @experimental - */ - timeout?: TimeDelta; - } - - 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 GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId; - } - - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - /** - * Symbolic group name that can be used to release the results. - */ - objectGroup?: string; - } - - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - - 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 SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - - 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 CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface GetIsolateIdReturnType { - /** - * The isolate id. - */ - id: string; - } - - interface GetHeapUsageReturnType { - /** - * Used heap size in bytes. - */ - usedSize: number; - /** - * Allocated heap size in bytes. - */ - totalSize: number; - } - - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[]; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - 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 ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in `exceptionThrown`. - */ - exceptionId: number; - } - - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: {}; - } - } - - 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 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 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; - } - } - - /** - * 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; - - /** - * Does nothing. - */ - post(method: "Console.clearMessages", 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; - - /** - * 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; - - /** - * 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; - - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable", callback?: (err: Error | null) => 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause", 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; - - /** - * 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; - - /** - * 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; - - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume", 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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 before each call to the given function. - * If another function was created from the same source as a given one, - * calling it will also trigger the breakpoint. - * @experimental - */ - post( - method: "Debugger.setBreakpointOnFunctionCall", - params?: Debugger.SetBreakpointOnFunctionCallParameterType, - callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void - ): void; - post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver", callback?: (err: Error | null) => 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.collectGarbage", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.enable", 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.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; - - post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => 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.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => 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: "Profiler.disable", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.enable", callback?: (err: Error | null) => 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; - - /** - * 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; - - /** - * 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; - - /** - * Enable type profile. - * @experimental - */ - post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => 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; - - /** - * Disable type profile. Disabling releases type profile data collected so far. - * @experimental - */ - post(method: "Profiler.stopTypeProfile", 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 type profile. - * @experimental - */ - post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * Returns the isolate id. - * @experimental - */ - post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void; - - /** - * Returns the JavaScript heap usage. - * It is the total usage of the corresponding isolate not scoped to a particular Runtime. - * @experimental - */ - post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => 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; - - /** - * 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; - - 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; - - /** - * 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; - - /** - * 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; - - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; - - /** - * Terminate current or next JavaScript execution. - * Will cancel the termination when the outer-most script execution ends. - * @experimental - */ - post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void; - - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => 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; - - // 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 console message is added. - */ - addListener(event: "Console.messageAdded", 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; - - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", 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; - - addListener(event: "HeapProfiler.addHeapSnapshotChunk", 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; - - /** - * 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; - - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "Profiler.consoleProfileFinished", 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; - - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", 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 object should be inspected (for example, as a result of inspect() command line API - * call). - */ - addListener(event: "Runtime.inspectRequested", 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; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionThrown", 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.inspectRequested", 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; - - 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 console message is added. - */ - on(event: "Console.messageAdded", 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; - - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", 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; - - on(event: "HeapProfiler.addHeapSnapshotChunk", 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; - - /** - * 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; - - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "Profiler.consoleProfileFinished", 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; - - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", 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 object should be inspected (for example, as a result of inspect() command line API - * call). - */ - on(event: "Runtime.inspectRequested", 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; - - 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 console message is added. - */ - once(event: "Console.messageAdded", 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; - - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", 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; - - once(event: "HeapProfiler.addHeapSnapshotChunk", 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; - - /** - * 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; - - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "Profiler.consoleProfileFinished", 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; - - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", 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 object should be inspected (for example, as a result of inspect() command line API - * call). - */ - once(event: "Runtime.inspectRequested", 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; - - 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 console message is added. - */ - prependListener(event: "Console.messageAdded", 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; - - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", 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; - - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", 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; - - /** - * 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; - - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "Profiler.consoleProfileFinished", 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; - - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", 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 object should be inspected (for example, as a result of inspect() command line API - * call). - */ - prependListener(event: "Runtime.inspectRequested", 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; - - 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 console message is added. - */ - prependOnceListener(event: "Console.messageAdded", 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; - - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", 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; - - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", 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; - - /** - * 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; - - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "Profiler.consoleProfileFinished", 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; - - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", 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 object should be inspected (for example, as a result of inspect() command line API - * call). - */ - prependOnceListener(event: "Runtime.inspectRequested", 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; - } - - // 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; -} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts deleted file mode 100644 index f512be7..0000000 --- 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 056cdec..0000000 --- a/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,251 +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: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - write(data: any, encoding?: string, callback?: Function): void; - - connect(options: SocketConnectOpts, connectionListener?: Function): this; - connect(port: number, host: string, connectionListener?: Function): this; - connect(port: number, connectionListener?: Function): this; - connect(path: string, connectionListener?: Function): this; - - setEncoding(encoding?: string): this; - pause(): this; - resume(): this; - setTimeout(timeout: number, callback?: Function): 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(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): 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; - } - - // 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?: Function): this; - listen(port?: number, hostname?: string, listeningListener?: Function): this; - listen(port?: number, backlog?: number, listeningListener?: Function): this; - listen(port?: number, listeningListener?: Function): this; - listen(path: string, backlog?: number, listeningListener?: Function): this; - listen(path: string, listeningListener?: Function): this; - listen(options: ListenOptions, listeningListener?: Function): this; - listen(handle: any, backlog?: number, listeningListener?: Function): this; - listen(handle: any, listeningListener?: Function): this; - close(callback?: (err?: Error) => void): this; - address(): AddressInfo | string; - 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?: Function): Socket; - function connect(port: number, host?: string, connectionListener?: Function): Socket; - function connect(path: string, connectionListener?: Function): Socket; - function createConnection(options: NetConnectOpts, connectionListener?: Function): Socket; - function createConnection(port: number, host?: string, connectionListener?: Function): Socket; - function createConnection(path: string, connectionListener?: Function): 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 c85d217..0000000 --- a/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,192 +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; - } - - 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: string }): { username: string, uid: number, gid: number, shell: any, homedir: string }; - 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 eacb821..0000000 --- a/node_modules/@types/node/package.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "_args": [ - [ - "@types/node@10.14.7", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/node@10.14.7", - "_id": "@types/node@10.14.7", - "_inBundle": false, - "_integrity": "sha512-on4MmIDgHXiuJDELPk1NFaKVUxxCFr37tm8E9yN6rAiF5Pzp/9bBfBHkoexqRiY+hk/Z04EJU9kKEb59YqJ82A==", - "_location": "/@types/node", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/node@10.14.7", - "name": "@types/node", - "escapedName": "@types%2fnode", - "scope": "@types", - "rawSpec": "10.14.7", - "saveSpec": null, - "fetchSpec": "10.14.7" - }, - "_requiredBy": [ - "#DEV:/", - "/@types/glob" - ], - "_resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.7.tgz", - "_spec": "10.14.7", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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": "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": "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": "Jeremie Rodriguez", - "url": "https://github.com/jeremiergz" - }, - { - "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" - } - ], - "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": "eeccf6213980dbbd8de2d7ec4f17980d0c5f23234c100a317cbcef2acdf99586", - "typesVersions": { - ">=3.2.0-0": { - "*": [ - "ts3.2/*" - ] - } - }, - "version": "10.14.7" -} diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts deleted file mode 100644 index bbc1709..0000000 --- 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: any[]): string; - function resolve(...pathSegments: any[]): 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: any[]): string; - function resolve(...pathSegments: any[]): 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 4f68895..0000000 --- a/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,241 +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; -} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts deleted file mode 100644 index ccd5c9c..0000000 --- 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 efc5562..0000000 --- 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: any; -} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index f54d352..0000000 --- a/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -declare module "querystring" { - interface StringifyOptions { - encodeURIComponent?: Function; - } - - interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: Function; - } - - interface ParsedUrlQuery { [key: string]: string | string[]; } - - function stringify(obj?: {}, sep?: string, eq?: string, options?: StringifyOptions): string; - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - 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 9c25da4..0000000 --- a/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,135 +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; - } - - type ReadLine = Interface; // type forwarded for backwards compatiblity - - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = (line: string, callback: (err: any, 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 cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; - function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void; - function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; - function clearLine(stream: NodeJS.WritableStream, dir: number): void; - function clearScreenDown(stream: NodeJS.WritableStream): void; -} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts deleted file mode 100644 index cb5a3d0..0000000 --- a/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,372 +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; - - /** - * 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 902cd85..0000000 --- a/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,294 +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; - } - - class Readable extends Stream implements NodeJS.ReadableStream { - 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): 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; - objectMode?: 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; - } - - class Writable extends Stream implements NodeJS.WritableStream { - writable: 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 { - writable: 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, 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; - } - - type TransformCallback = (error?: Error, 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; - } - } - - 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 762a4d8..0000000 --- a/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module "string_decoder" { - interface NodeStringDecoder { - write(buffer: Buffer): string; - end(buffer?: Buffer): string; - } - const StringDecoder: { - new(encoding?: string): NodeStringDecoder; - }; -} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts deleted file mode 100644 index e64a673..0000000 --- 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 f59dcc7..0000000 --- a/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,371 +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; - } - - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket, options?: { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext, - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean, - /** - * An optional net.Server instance. - */ - server?: net.Server, - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean, - /** - * 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. Defaults to false. - */ - rejectUnauthorized?: boolean, - /** - * An array of strings or a Buffer naming possible NPN protocols. - * (Protocols should be ordered by their priority.) - */ - NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array, - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) When the server - * receives both NPN and ALPN extensions from the client, ALPN takes - * precedence over NPN and the server does not send an NPN extension - * to the client. - */ - ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | 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, - /** - * 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 - }); - - /** - * 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(): any; - /** - * 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(): any; - /** - * 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. - */ - renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): any; - /** - * 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; - - /** - * events.EventEmitter - * 1. OCSPResponse - * 2. secureConnect - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - } - - interface TlsOptions extends SecureContextOptions { - handshakeTimeout?: number; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; - ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; - SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; - sessionTimeout?: number; - ticketKeys?: Buffer; - } - - interface ConnectionOptions extends SecureContextOptions { - 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 - rejectUnauthorized?: boolean; // Defaults to true - NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; - ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; - checkServerIdentity?: typeof checkServerIdentity; - servername?: string; // SNI TLS Extension - session?: Buffer; - minDHSize?: number; - secureContext?: SecureContext; // If not provided, the entire ConnectionOptions object will be passed to tls.createSecureContext() - lookup?: net.LookupFunction; - } - - class Server extends net.Server { - addContext(hostName: string, credentials: { - key: string; - cert: string; - ca: string; - }): 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: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; - emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; - emit(event: "secureConnection", 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: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - on(event: "secureConnection", listener: (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: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - once(event: "secureConnection", listener: (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: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependListener(event: "secureConnection", listener: (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: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - } - - interface SecurePair { - encrypted: any; - cleartext: any; - } - - 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; - } - - 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(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; - function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; - function createSecureContext(details: SecureContextOptions): SecureContext; - function getCiphers(): string[]; - - const DEFAULT_ECDH_CURVE: string; -} 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 9d1a59b..0000000 --- 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 c14a1a3..0000000 --- a/node_modules/@types/node/ts3.2/globals.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// tslint:disable-next-line:no-bad-reference -/// - -declare namespace NodeJS { - interface HRTime { - bigint(): bigint; - } -} 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 ce7709b..0000000 --- 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 a8b2487..0000000 --- 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 7d75c89..0000000 --- a/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare module "tty" { - import * as net from "net"; - - function isatty(fd: number): boolean; - class ReadStream extends net.Socket { - isRaw: boolean; - setRawMode(mode: boolean): void; - isTTY: boolean; - } - class WriteStream extends net.Socket { - 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 1e1d154..0000000 --- a/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -declare module "url" { - import { ParsedUrlQuery } 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 | { [key: string]: any }; - } - - // 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 067dc04..0000000 --- a/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,170 +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 `console.error()` instead. */ - function debug(string: string): void; - /** @deprecated since v0.11.3 - use `console.error()` instead. */ - function error(...param: any[]): void; - /** @deprecated since v0.11.3 - use `console.log()` instead. */ - function puts(...param: any[]): void; - /** @deprecated since v0.11.3 - use `console.log()` instead. */ - function print(...param: any[]): void; - /** @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; - } - /** @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 | null, 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 | null, 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; - constructor(); - 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 ee5f707..0000000 --- a/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -declare module "v8" { - 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; - } - - function getHeapStatistics(): HeapInfo; - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - function setFlagsFromString(flags: string): void; -} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts deleted file mode 100644 index 404fa9c..0000000 --- a/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,64 +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[]; - } - class Script { - constructor(code: string, options?: ScriptOptions); - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; - runInThisContext(options?: RunningScriptOptions): any; - } - function createContext(sandbox?: Context): 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 b20748a..0000000 --- a/node_modules/@types/node/worker_threads.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -declare module "worker_threads" { - 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; - } - - 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; - terminate(callback?: (err: any, exitCode: number) => void): void; - - addListener(event: "error", listener: (err: any) => 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: any): 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: any) => 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: any) => 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: any) => 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: any) => 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: any) => 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: any) => 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 dff374b..0000000 --- a/node_modules/@types/node/zlib.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -declare module "zlib" { - import * as stream from "stream"; - - interface ZlibOptions { - flush?: number; // default: zlib.constants.Z_NO_FLUSH - finishFlush?: number; // default: zlib.constants.Z_FINISH - chunkSize?: number; // default: 16*1024 - windowBits?: number; - level?: number; // compression only - memLevel?: number; // compression only - strategy?: number; // compression only - dictionary?: Buffer | NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default - } - - 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 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 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 | Buffer | DataView | ArrayBuffer | NodeJS.TypedArray; - function deflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function deflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; - function deflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function deflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; - function gzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function gzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; - function gunzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function gunzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; - function inflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function inflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; - function inflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function inflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; - function unzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; - function unzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; - function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; - - namespace constants { - // Allowed flush values. - - const Z_NO_FLUSH: number; - const Z_PARTIAL_FLUSH: number; - const Z_SYNC_FLUSH: number; - const Z_FULL_FLUSH: number; - const Z_FINISH: number; - const Z_BLOCK: number; - const Z_TREES: number; - - // Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events. - - const Z_OK: number; - const Z_STREAM_END: number; - const Z_NEED_DICT: number; - const Z_ERRNO: number; - const Z_STREAM_ERROR: number; - const Z_DATA_ERROR: number; - const Z_MEM_ERROR: number; - const Z_BUF_ERROR: number; - const Z_VERSION_ERROR: number; - - // Compression levels. - - const Z_NO_COMPRESSION: number; - const Z_BEST_SPEED: number; - const Z_BEST_COMPRESSION: number; - const Z_DEFAULT_COMPRESSION: number; - - // Compression strategy. - - const Z_FILTERED: number; - const Z_HUFFMAN_ONLY: number; - const Z_RLE: number; - const Z_FIXED: number; - const Z_DEFAULT_STRATEGY: number; - } - - // Constants - const Z_NO_FLUSH: number; - const Z_PARTIAL_FLUSH: number; - const Z_SYNC_FLUSH: number; - const Z_FULL_FLUSH: number; - const Z_FINISH: number; - const Z_BLOCK: number; - const Z_TREES: number; - const Z_OK: number; - const Z_STREAM_END: number; - const Z_NEED_DICT: number; - const Z_ERRNO: number; - const Z_STREAM_ERROR: number; - const Z_DATA_ERROR: number; - const Z_MEM_ERROR: number; - const Z_BUF_ERROR: number; - const Z_VERSION_ERROR: number; - const Z_NO_COMPRESSION: number; - const Z_BEST_SPEED: number; - const Z_BEST_COMPRESSION: number; - const Z_DEFAULT_COMPRESSION: number; - const Z_FILTERED: number; - const Z_HUFFMAN_ONLY: number; - const Z_RLE: number; - const Z_FIXED: number; - const Z_DEFAULT_STRATEGY: number; - const Z_BINARY: number; - const Z_TEXT: number; - const Z_ASCII: number; - const Z_UNKNOWN: number; - const Z_DEFLATED: number; -} diff --git a/node_modules/@types/vscode/LICENSE b/node_modules/@types/vscode/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/node_modules/@types/vscode/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/vscode/README.md b/node_modules/@types/vscode/README.md deleted file mode 100644 index a9256c9..0000000 --- a/node_modules/@types/vscode/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/vscode` - -# Summary -This package contains type definitions for Visual Studio Code (https://github.com/microsoft/vscode). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vscode - -Additional Details - * Last updated: Thu, 10 Oct 2019 01:03:30 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Visual Studio Code Team, and Microsoft . diff --git a/node_modules/@types/vscode/index.d.ts b/node_modules/@types/vscode/index.d.ts deleted file mode 100644 index 748043d..0000000 --- a/node_modules/@types/vscode/index.d.ts +++ /dev/null @@ -1,9684 +0,0 @@ -// Type definitions for Visual Studio Code 1.39 -// Project: https://github.com/microsoft/vscode -// Definitions by: Visual Studio Code Team, Microsoft -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * Type Definition for Visual Studio Code 1.39 Extension API - * See https://code.visualstudio.com/api for more information - */ - -declare module 'vscode' { - - /** - * The version of the editor. - */ - export const version: string; - - /** - * Represents a reference to a command. Provides a title which - * will be used to represent a command in the UI and, optionally, - * an array of arguments which will be passed to the command handler - * function when invoked. - */ - export interface Command { - /** - * Title of the command, like `save`. - */ - title: string; - - /** - * The identifier of the actual command handler. - * @see [commands.registerCommand](#commands.registerCommand). - */ - command: string; - - /** - * A tooltip for the command, when represented in the UI. - */ - tooltip?: string; - - /** - * Arguments that the command handler should be - * invoked with. - */ - arguments?: any[]; - } - - /** - * Represents a line of text, such as a line of source code. - * - * TextLine objects are __immutable__. When a [document](#TextDocument) changes, - * previously retrieved lines will not represent the latest state. - */ - export interface TextLine { - - /** - * The zero-based line number. - */ - readonly lineNumber: number; - - /** - * The text of this line without the line separator characters. - */ - readonly text: string; - - /** - * The range this line covers without the line separator characters. - */ - readonly range: Range; - - /** - * The range this line covers with the line separator characters. - */ - readonly rangeIncludingLineBreak: Range; - - /** - * The offset of the first character which is not a whitespace character as defined - * by `/\s/`. **Note** that if a line is all whitespace the length of the line is returned. - */ - readonly firstNonWhitespaceCharacterIndex: number; - - /** - * Whether this line is whitespace only, shorthand - * for [TextLine.firstNonWhitespaceCharacterIndex](#TextLine.firstNonWhitespaceCharacterIndex) === [TextLine.text.length](#TextLine.text). - */ - readonly isEmptyOrWhitespace: boolean; - } - - /** - * Represents a text document, such as a source file. Text documents have - * [lines](#TextLine) and knowledge about an underlying resource like a file. - */ - export interface TextDocument { - - /** - * The associated uri for this document. - * - * *Note* that most documents use the `file`-scheme, which means they are files on disk. However, **not** all documents are - * saved on disk and therefore the `scheme` must be checked before trying to access the underlying file or siblings on disk. - * - * @see [FileSystemProvider](#FileSystemProvider) - * @see [TextDocumentContentProvider](#TextDocumentContentProvider) - */ - readonly uri: Uri; - - /** - * The file system path of the associated resource. Shorthand - * notation for [TextDocument.uri.fsPath](#TextDocument.uri). Independent of the uri scheme. - */ - readonly fileName: string; - - /** - * Is this document representing an untitled file which has never been saved yet. *Note* that - * this does not mean the document will be saved to disk, use [`uri.scheme`](#Uri.scheme) - * to figure out where a document will be [saved](#FileSystemProvider), e.g. `file`, `ftp` etc. - */ - readonly isUntitled: boolean; - - /** - * The identifier of the language associated with this document. - */ - readonly languageId: string; - - /** - * The version number of this document (it will strictly increase after each - * change, including undo/redo). - */ - readonly version: number; - - /** - * `true` if there are unpersisted changes. - */ - readonly isDirty: boolean; - - /** - * `true` if the document have been closed. A closed document isn't synchronized anymore - * and won't be re-used when the same resource is opened again. - */ - readonly isClosed: boolean; - - /** - * Save the underlying file. - * - * @return A promise that will resolve to true when the file - * has been saved. If the file was not dirty or the save failed, - * will return false. - */ - save(): Thenable; - - /** - * The [end of line](#EndOfLine) sequence that is predominately - * used in this document. - */ - readonly eol: EndOfLine; - - /** - * The number of lines in this document. - */ - readonly lineCount: number; - - /** - * Returns a text line denoted by the line number. Note - * that the returned object is *not* live and changes to the - * document are not reflected. - * - * @param line A line number in [0, lineCount). - * @return A [line](#TextLine). - */ - lineAt(line: number): TextLine; - - /** - * Returns a text line denoted by the position. Note - * that the returned object is *not* live and changes to the - * document are not reflected. - * - * The position will be [adjusted](#TextDocument.validatePosition). - * - * @see [TextDocument.lineAt](#TextDocument.lineAt) - * @param position A position. - * @return A [line](#TextLine). - */ - lineAt(position: Position): TextLine; - - /** - * Converts the position to a zero-based offset. - * - * The position will be [adjusted](#TextDocument.validatePosition). - * - * @param position A position. - * @return A valid zero-based offset. - */ - offsetAt(position: Position): number; - - /** - * Converts a zero-based offset to a position. - * - * @param offset A zero-based offset. - * @return A valid [position](#Position). - */ - positionAt(offset: number): Position; - - /** - * Get the text of this document. A substring can be retrieved by providing - * a range. The range will be [adjusted](#TextDocument.validateRange). - * - * @param range Include only the text included by the range. - * @return The text inside the provided range or the entire text. - */ - getText(range?: Range): string; - - /** - * Get a word-range at the given position. By default words are defined by - * common separators, like space, -, _, etc. In addition, per language custom - * [word definitions](#LanguageConfiguration.wordPattern) can be defined. It - * is also possible to provide a custom regular expression. - * - * * *Note 1:* A custom regular expression must not match the empty string and - * if it does, it will be ignored. - * * *Note 2:* A custom regular expression will fail to match multiline strings - * and in the name of speed regular expressions should not match words with - * spaces. Use [`TextLine.text`](#TextLine.text) for more complex, non-wordy, scenarios. - * - * The position will be [adjusted](#TextDocument.validatePosition). - * - * @param position A position. - * @param regex Optional regular expression that describes what a word is. - * @return A range spanning a word, or `undefined`. - */ - getWordRangeAtPosition(position: Position, regex?: RegExp): Range | undefined; - - /** - * Ensure a range is completely contained in this document. - * - * @param range A range. - * @return The given range or a new, adjusted range. - */ - validateRange(range: Range): Range; - - /** - * Ensure a position is contained in the range of this document. - * - * @param position A position. - * @return The given position or a new, adjusted position. - */ - validatePosition(position: Position): Position; - } - - /** - * Represents a line and character position, such as - * the position of the cursor. - * - * Position objects are __immutable__. Use the [with](#Position.with) or - * [translate](#Position.translate) methods to derive new positions - * from an existing position. - */ - export class Position { - - /** - * The zero-based line value. - */ - readonly line: number; - - /** - * The zero-based character value. - */ - readonly character: number; - - /** - * @param line A zero-based line value. - * @param character A zero-based character value. - */ - constructor(line: number, character: number); - - /** - * Check if this position is before `other`. - * - * @param other A position. - * @return `true` if position is on a smaller line - * or on the same line on a smaller character. - */ - isBefore(other: Position): boolean; - - /** - * Check if this position is before or equal to `other`. - * - * @param other A position. - * @return `true` if position is on a smaller line - * or on the same line on a smaller or equal character. - */ - isBeforeOrEqual(other: Position): boolean; - - /** - * Check if this position is after `other`. - * - * @param other A position. - * @return `true` if position is on a greater line - * or on the same line on a greater character. - */ - isAfter(other: Position): boolean; - - /** - * Check if this position is after or equal to `other`. - * - * @param other A position. - * @return `true` if position is on a greater line - * or on the same line on a greater or equal character. - */ - isAfterOrEqual(other: Position): boolean; - - /** - * Check if this position is equal to `other`. - * - * @param other A position. - * @return `true` if the line and character of the given position are equal to - * the line and character of this position. - */ - isEqual(other: Position): boolean; - - /** - * Compare this to `other`. - * - * @param other A position. - * @return A number smaller than zero if this position is before the given position, - * a number greater than zero if this position is after the given position, or zero when - * this and the given position are equal. - */ - compareTo(other: Position): number; - - /** - * Create a new position relative to this position. - * - * @param lineDelta Delta value for the line value, default is `0`. - * @param characterDelta Delta value for the character value, default is `0`. - * @return A position which line and character is the sum of the current line and - * character and the corresponding deltas. - */ - translate(lineDelta?: number, characterDelta?: number): Position; - - /** - * Derived a new position relative to this position. - * - * @param change An object that describes a delta to this position. - * @return A position that reflects the given delta. Will return `this` position if the change - * is not changing anything. - */ - translate(change: { lineDelta?: number; characterDelta?: number; }): Position; - - /** - * Create a new position derived from this position. - * - * @param line Value that should be used as line value, default is the [existing value](#Position.line) - * @param character Value that should be used as character value, default is the [existing value](#Position.character) - * @return A position where line and character are replaced by the given values. - */ - with(line?: number, character?: number): Position; - - /** - * Derived a new position from this position. - * - * @param change An object that describes a change to this position. - * @return A position that reflects the given change. Will return `this` position if the change - * is not changing anything. - */ - with(change: { line?: number; character?: number; }): Position; - } - - /** - * A range represents an ordered pair of two positions. - * It is guaranteed that [start](#Range.start).isBeforeOrEqual([end](#Range.end)) - * - * Range objects are __immutable__. Use the [with](#Range.with), - * [intersection](#Range.intersection), or [union](#Range.union) methods - * to derive new ranges from an existing range. - */ - export class Range { - - /** - * The start position. It is before or equal to [end](#Range.end). - */ - readonly start: Position; - - /** - * The end position. It is after or equal to [start](#Range.start). - */ - readonly end: Position; - - /** - * Create a new range from two positions. If `start` is not - * before or equal to `end`, the values will be swapped. - * - * @param start A position. - * @param end A position. - */ - constructor(start: Position, end: Position); - - /** - * Create a new range from number coordinates. It is a shorter equivalent of - * using `new Range(new Position(startLine, startCharacter), new Position(endLine, endCharacter))` - * - * @param startLine A zero-based line value. - * @param startCharacter A zero-based character value. - * @param endLine A zero-based line value. - * @param endCharacter A zero-based character value. - */ - constructor(startLine: number, startCharacter: number, endLine: number, endCharacter: number); - - /** - * `true` if `start` and `end` are equal. - */ - isEmpty: boolean; - - /** - * `true` if `start.line` and `end.line` are equal. - */ - isSingleLine: boolean; - - /** - * Check if a position or a range is contained in this range. - * - * @param positionOrRange A position or a range. - * @return `true` if the position or range is inside or equal - * to this range. - */ - contains(positionOrRange: Position | Range): boolean; - - /** - * Check if `other` equals this range. - * - * @param other A range. - * @return `true` when start and end are [equal](#Position.isEqual) to - * start and end of this range. - */ - isEqual(other: Range): boolean; - - /** - * Intersect `range` with this range and returns a new range or `undefined` - * if the ranges have no overlap. - * - * @param range A range. - * @return A range of the greater start and smaller end positions. Will - * return undefined when there is no overlap. - */ - intersection(range: Range): Range | undefined; - - /** - * Compute the union of `other` with this range. - * - * @param other A range. - * @return A range of smaller start position and the greater end position. - */ - union(other: Range): Range; - - /** - * Derived a new range from this range. - * - * @param start A position that should be used as start. The default value is the [current start](#Range.start). - * @param end A position that should be used as end. The default value is the [current end](#Range.end). - * @return A range derived from this range with the given start and end position. - * If start and end are not different `this` range will be returned. - */ - with(start?: Position, end?: Position): Range; - - /** - * Derived a new range from this range. - * - * @param change An object that describes a change to this range. - * @return A range that reflects the given change. Will return `this` range if the change - * is not changing anything. - */ - with(change: { start?: Position, end?: Position }): Range; - } - - /** - * Represents a text selection in an editor. - */ - export class Selection extends Range { - - /** - * The position at which the selection starts. - * This position might be before or after [active](#Selection.active). - */ - anchor: Position; - - /** - * The position of the cursor. - * This position might be before or after [anchor](#Selection.anchor). - */ - active: Position; - - /** - * Create a selection from two positions. - * - * @param anchor A position. - * @param active A position. - */ - constructor(anchor: Position, active: Position); - - /** - * Create a selection from four coordinates. - * - * @param anchorLine A zero-based line value. - * @param anchorCharacter A zero-based character value. - * @param activeLine A zero-based line value. - * @param activeCharacter A zero-based character value. - */ - constructor(anchorLine: number, anchorCharacter: number, activeLine: number, activeCharacter: number); - - /** - * A selection is reversed if [active](#Selection.active).isBefore([anchor](#Selection.anchor)). - */ - isReversed: boolean; - } - - /** - * Represents sources that can cause [selection change events](#window.onDidChangeTextEditorSelection). - */ - export enum TextEditorSelectionChangeKind { - /** - * Selection changed due to typing in the editor. - */ - Keyboard = 1, - /** - * Selection change due to clicking in the editor. - */ - Mouse = 2, - /** - * Selection changed because a command ran. - */ - Command = 3 - } - - /** - * Represents an event describing the change in a [text editor's selections](#TextEditor.selections). - */ - export interface TextEditorSelectionChangeEvent { - /** - * The [text editor](#TextEditor) for which the selections have changed. - */ - readonly textEditor: TextEditor; - /** - * The new value for the [text editor's selections](#TextEditor.selections). - */ - readonly selections: ReadonlyArray; - /** - * The [change kind](#TextEditorSelectionChangeKind) which has triggered this - * event. Can be `undefined`. - */ - readonly kind?: TextEditorSelectionChangeKind; - } - - /** - * Represents an event describing the change in a [text editor's visible ranges](#TextEditor.visibleRanges). - */ - export interface TextEditorVisibleRangesChangeEvent { - /** - * The [text editor](#TextEditor) for which the visible ranges have changed. - */ - readonly textEditor: TextEditor; - /** - * The new value for the [text editor's visible ranges](#TextEditor.visibleRanges). - */ - readonly visibleRanges: ReadonlyArray; - } - - /** - * Represents an event describing the change in a [text editor's options](#TextEditor.options). - */ - export interface TextEditorOptionsChangeEvent { - /** - * The [text editor](#TextEditor) for which the options have changed. - */ - readonly textEditor: TextEditor; - /** - * The new value for the [text editor's options](#TextEditor.options). - */ - readonly options: TextEditorOptions; - } - - /** - * Represents an event describing the change of a [text editor's view column](#TextEditor.viewColumn). - */ - export interface TextEditorViewColumnChangeEvent { - /** - * The [text editor](#TextEditor) for which the view column has changed. - */ - readonly textEditor: TextEditor; - /** - * The new value for the [text editor's view column](#TextEditor.viewColumn). - */ - readonly viewColumn: ViewColumn; - } - - /** - * Rendering style of the cursor. - */ - export enum TextEditorCursorStyle { - /** - * Render the cursor as a vertical thick line. - */ - Line = 1, - /** - * Render the cursor as a block filled. - */ - Block = 2, - /** - * Render the cursor as a thick horizontal line. - */ - Underline = 3, - /** - * Render the cursor as a vertical thin line. - */ - LineThin = 4, - /** - * Render the cursor as a block outlined. - */ - BlockOutline = 5, - /** - * Render the cursor as a thin horizontal line. - */ - UnderlineThin = 6 - } - - /** - * Rendering style of the line numbers. - */ - export enum TextEditorLineNumbersStyle { - /** - * Do not render the line numbers. - */ - Off = 0, - /** - * Render the line numbers. - */ - On = 1, - /** - * Render the line numbers with values relative to the primary cursor location. - */ - Relative = 2 - } - - /** - * Represents a [text editor](#TextEditor)'s [options](#TextEditor.options). - */ - export interface TextEditorOptions { - - /** - * The size in spaces a tab takes. This is used for two purposes: - * - the rendering width of a tab character; - * - the number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true. - * - * When getting a text editor's options, this property will always be a number (resolved). - * When setting a text editor's options, this property is optional and it can be a number or `"auto"`. - */ - tabSize?: number | string; - - /** - * When pressing Tab insert [n](#TextEditorOptions.tabSize) spaces. - * When getting a text editor's options, this property will always be a boolean (resolved). - * When setting a text editor's options, this property is optional and it can be a boolean or `"auto"`. - */ - insertSpaces?: boolean | string; - - /** - * The rendering style of the cursor in this editor. - * When getting a text editor's options, this property will always be present. - * When setting a text editor's options, this property is optional. - */ - cursorStyle?: TextEditorCursorStyle; - - /** - * Render relative line numbers w.r.t. the current line number. - * When getting a text editor's options, this property will always be present. - * When setting a text editor's options, this property is optional. - */ - lineNumbers?: TextEditorLineNumbersStyle; - } - - /** - * Represents a handle to a set of decorations - * sharing the same [styling options](#DecorationRenderOptions) in a [text editor](#TextEditor). - * - * To get an instance of a `TextEditorDecorationType` use - * [createTextEditorDecorationType](#window.createTextEditorDecorationType). - */ - export interface TextEditorDecorationType { - - /** - * Internal representation of the handle. - */ - readonly key: string; - - /** - * Remove this decoration type and all decorations on all text editors using it. - */ - dispose(): void; - } - - /** - * Represents different [reveal](#TextEditor.revealRange) strategies in a text editor. - */ - export enum TextEditorRevealType { - /** - * The range will be revealed with as little scrolling as possible. - */ - Default = 0, - /** - * The range will always be revealed in the center of the viewport. - */ - InCenter = 1, - /** - * If the range is outside the viewport, it will be revealed in the center of the viewport. - * Otherwise, it will be revealed with as little scrolling as possible. - */ - InCenterIfOutsideViewport = 2, - /** - * The range will always be revealed at the top of the viewport. - */ - AtTop = 3 - } - - /** - * Represents different positions for rendering a decoration in an [overview ruler](#DecorationRenderOptions.overviewRulerLane). - * The overview ruler supports three lanes. - */ - export enum OverviewRulerLane { - Left = 1, - Center = 2, - Right = 4, - Full = 7 - } - - /** - * Describes the behavior of decorations when typing/editing at their edges. - */ - export enum DecorationRangeBehavior { - /** - * The decoration's range will widen when edits occur at the start or end. - */ - OpenOpen = 0, - /** - * The decoration's range will not widen when edits occur at the start of end. - */ - ClosedClosed = 1, - /** - * The decoration's range will widen when edits occur at the start, but not at the end. - */ - OpenClosed = 2, - /** - * The decoration's range will widen when edits occur at the end, but not at the start. - */ - ClosedOpen = 3 - } - - /** - * Represents options to configure the behavior of showing a [document](#TextDocument) in an [editor](#TextEditor). - */ - export interface TextDocumentShowOptions { - /** - * An optional view column in which the [editor](#TextEditor) should be shown. - * The default is the [active](#ViewColumn.Active), other values are adjusted to - * be `Min(column, columnCount + 1)`, the [active](#ViewColumn.Active)-column is - * not adjusted. Use [`ViewColumn.Beside`](#ViewColumn.Beside) to open the - * editor to the side of the currently active one. - */ - viewColumn?: ViewColumn; - - /** - * An optional flag that when `true` will stop the [editor](#TextEditor) from taking focus. - */ - preserveFocus?: boolean; - - /** - * An optional flag that controls if an [editor](#TextEditor)-tab will be replaced - * with the next editor or if it will be kept. - */ - preview?: boolean; - - /** - * An optional selection to apply for the document in the [editor](#TextEditor). - */ - selection?: Range; - } - - /** - * A reference to one of the workbench colors as defined in https://code.visualstudio.com/docs/getstarted/theme-color-reference. - * Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color. - */ - export class ThemeColor { - - /** - * Creates a reference to a theme color. - * @param id of the color. The available colors are listed in https://code.visualstudio.com/docs/getstarted/theme-color-reference. - */ - constructor(id: string); - } - - /** - * A reference to a named icon. Currently only [File](#ThemeIcon.File) and [Folder](#ThemeIcon.Folder) are supported. - * Using a theme icon is preferred over a custom icon as it gives theme authors the possibility to change the icons. - */ - export class ThemeIcon { - /** - * Reference to a icon representing a file. The icon is taken from the current file icon theme or a placeholder icon. - */ - static readonly File: ThemeIcon; - - /** - * Reference to a icon representing a folder. The icon is taken from the current file icon theme or a placeholder icon. - */ - static readonly Folder: ThemeIcon; - - private constructor(id: string); - } - - /** - * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). - */ - export interface ThemableDecorationRenderOptions { - /** - * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. - * Alternatively a color from the color registry can be [referenced](#ThemeColor). - */ - backgroundColor?: string | ThemeColor; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - outline?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'outline' for setting one or more of the individual outline properties. - */ - outlineColor?: string | ThemeColor; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'outline' for setting one or more of the individual outline properties. - */ - outlineStyle?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'outline' for setting one or more of the individual outline properties. - */ - outlineWidth?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - border?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'border' for setting one or more of the individual border properties. - */ - borderColor?: string | ThemeColor; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'border' for setting one or more of the individual border properties. - */ - borderRadius?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'border' for setting one or more of the individual border properties. - */ - borderSpacing?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'border' for setting one or more of the individual border properties. - */ - borderStyle?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - * Better use 'border' for setting one or more of the individual border properties. - */ - borderWidth?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - fontStyle?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - fontWeight?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - textDecoration?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - cursor?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - color?: string | ThemeColor; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - opacity?: string; - - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - letterSpacing?: string; - - /** - * An **absolute path** or an URI to an image to be rendered in the gutter. - */ - gutterIconPath?: string | Uri; - - /** - * Specifies the size of the gutter icon. - * Available values are 'auto', 'contain', 'cover' and any percentage value. - * For further information: https://msdn.microsoft.com/en-us/library/jj127316(v=vs.85).aspx - */ - gutterIconSize?: string; - - /** - * The color of the decoration in the overview ruler. Use rgba() and define transparent colors to play well with other decorations. - */ - overviewRulerColor?: string | ThemeColor; - - /** - * Defines the rendering options of the attachment that is inserted before the decorated text. - */ - before?: ThemableDecorationAttachmentRenderOptions; - - /** - * Defines the rendering options of the attachment that is inserted after the decorated text. - */ - after?: ThemableDecorationAttachmentRenderOptions; - } - - export interface ThemableDecorationAttachmentRenderOptions { - /** - * Defines a text content that is shown in the attachment. Either an icon or a text can be shown, but not both. - */ - contentText?: string; - /** - * An **absolute path** or an URI to an image to be rendered in the attachment. Either an icon - * or a text can be shown, but not both. - */ - contentIconPath?: string | Uri; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - border?: string; - /** - * CSS styling property that will be applied to text enclosed by a decoration. - */ - borderColor?: string | ThemeColor; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - fontStyle?: string; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - fontWeight?: string; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - textDecoration?: string; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - color?: string | ThemeColor; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - backgroundColor?: string | ThemeColor; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - margin?: string; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - width?: string; - /** - * CSS styling property that will be applied to the decoration attachment. - */ - height?: string; - } - - /** - * Represents rendering styles for a [text editor decoration](#TextEditorDecorationType). - */ - export interface DecorationRenderOptions extends ThemableDecorationRenderOptions { - /** - * Should the decoration be rendered also on the whitespace after the line text. - * Defaults to `false`. - */ - isWholeLine?: boolean; - - /** - * Customize the growing behavior of the decoration when edits occur at the edges of the decoration's range. - * Defaults to `DecorationRangeBehavior.OpenOpen`. - */ - rangeBehavior?: DecorationRangeBehavior; - - /** - * The position in the overview ruler where the decoration should be rendered. - */ - overviewRulerLane?: OverviewRulerLane; - - /** - * Overwrite options for light themes. - */ - light?: ThemableDecorationRenderOptions; - - /** - * Overwrite options for dark themes. - */ - dark?: ThemableDecorationRenderOptions; - } - - /** - * Represents options for a specific decoration in a [decoration set](#TextEditorDecorationType). - */ - export interface DecorationOptions { - - /** - * Range to which this decoration is applied. The range must not be empty. - */ - range: Range; - - /** - * A message that should be rendered when hovering over the decoration. - */ - hoverMessage?: MarkedString | MarkedString[]; - - /** - * Render options applied to the current decoration. For performance reasons, keep the - * number of decoration specific options small, and use decoration types wherever possible. - */ - renderOptions?: DecorationInstanceRenderOptions; - } - - export interface ThemableDecorationInstanceRenderOptions { - /** - * Defines the rendering options of the attachment that is inserted before the decorated text. - */ - before?: ThemableDecorationAttachmentRenderOptions; - - /** - * Defines the rendering options of the attachment that is inserted after the decorated text. - */ - after?: ThemableDecorationAttachmentRenderOptions; - } - - export interface DecorationInstanceRenderOptions extends ThemableDecorationInstanceRenderOptions { - /** - * Overwrite options for light themes. - */ - light?: ThemableDecorationInstanceRenderOptions; - - /** - * Overwrite options for dark themes. - */ - dark?: ThemableDecorationInstanceRenderOptions; - } - - /** - * Represents an editor that is attached to a [document](#TextDocument). - */ - export interface TextEditor { - - /** - * The document associated with this text editor. The document will be the same for the entire lifetime of this text editor. - */ - readonly document: TextDocument; - - /** - * The primary selection on this text editor. Shorthand for `TextEditor.selections[0]`. - */ - selection: Selection; - - /** - * The selections in this text editor. The primary selection is always at index 0. - */ - selections: Selection[]; - - /** - * The current visible ranges in the editor (vertically). - * This accounts only for vertical scrolling, and not for horizontal scrolling. - */ - readonly visibleRanges: Range[]; - - /** - * Text editor options. - */ - options: TextEditorOptions; - - /** - * The column in which this editor shows. Will be `undefined` in case this - * isn't one of the main editors, e.g. an embedded editor, or when the editor - * column is larger than three. - */ - viewColumn?: ViewColumn; - - /** - * Perform an edit on the document associated with this text editor. - * - * The given callback-function is invoked with an [edit-builder](#TextEditorEdit) which must - * be used to make edits. Note that the edit-builder is only valid while the - * callback executes. - * - * @param callback A function which can create edits using an [edit-builder](#TextEditorEdit). - * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. - * @return A promise that resolves with a value indicating if the edits could be applied. - */ - edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable; - - /** - * Insert a [snippet](#SnippetString) and put the editor into snippet mode. "Snippet mode" - * means the editor adds placeholders and additional cursors so that the user can complete - * or accept the snippet. - * - * @param snippet The snippet to insert in this edit. - * @param location Position or range at which to insert the snippet, defaults to the current editor selection or selections. - * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. - * @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal - * that the snippet is completely filled-in or accepted. - */ - insertSnippet(snippet: SnippetString, location?: Position | Range | ReadonlyArray | ReadonlyArray, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable; - - /** - * Adds a set of decorations to the text editor. If a set of decorations already exists with - * the given [decoration type](#TextEditorDecorationType), they will be replaced. - * - * @see [createTextEditorDecorationType](#window.createTextEditorDecorationType). - * - * @param decorationType A decoration type. - * @param rangesOrOptions Either [ranges](#Range) or more detailed [options](#DecorationOptions). - */ - setDecorations(decorationType: TextEditorDecorationType, rangesOrOptions: Range[] | DecorationOptions[]): void; - - /** - * Scroll as indicated by `revealType` in order to reveal the given range. - * - * @param range A range. - * @param revealType The scrolling strategy for revealing `range`. - */ - revealRange(range: Range, revealType?: TextEditorRevealType): void; - - /** - * ~~Show the text editor.~~ - * - * @deprecated Use [window.showTextDocument](#window.showTextDocument) instead. - * - * @param column The [column](#ViewColumn) in which to show this editor. - * This method shows unexpected behavior and will be removed in the next major update. - */ - show(column?: ViewColumn): void; - - /** - * ~~Hide the text editor.~~ - * - * @deprecated Use the command `workbench.action.closeActiveEditor` instead. - * This method shows unexpected behavior and will be removed in the next major update. - */ - hide(): void; - } - - /** - * Represents an end of line character sequence in a [document](#TextDocument). - */ - export enum EndOfLine { - /** - * The line feed `\n` character. - */ - LF = 1, - /** - * The carriage return line feed `\r\n` sequence. - */ - CRLF = 2 - } - - /** - * A complex edit that will be applied in one transaction on a TextEditor. - * This holds a description of the edits and if the edits are valid (i.e. no overlapping regions, document was not changed in the meantime, etc.) - * they can be applied on a [document](#TextDocument) associated with a [text editor](#TextEditor). - * - */ - export interface TextEditorEdit { - /** - * Replace a certain text region with a new value. - * You can use \r\n or \n in `value` and they will be normalized to the current [document](#TextDocument). - * - * @param location The range this operation should remove. - * @param value The new text this operation should insert after removing `location`. - */ - replace(location: Position | Range | Selection, value: string): void; - - /** - * Insert text at a location. - * You can use \r\n or \n in `value` and they will be normalized to the current [document](#TextDocument). - * Although the equivalent text edit can be made with [replace](#TextEditorEdit.replace), `insert` will produce a different resulting selection (it will get moved). - * - * @param location The position where the new text should be inserted. - * @param value The new text this operation should insert. - */ - insert(location: Position, value: string): void; - - /** - * Delete a certain text region. - * - * @param location The range this operation should remove. - */ - delete(location: Range | Selection): void; - - /** - * Set the end of line sequence. - * - * @param endOfLine The new end of line for the [document](#TextDocument). - */ - setEndOfLine(endOfLine: EndOfLine): void; - } - - /** - * A universal resource identifier representing either a file on disk - * or another resource, like untitled resources. - */ - export class Uri { - - /** - * Create an URI from a string, e.g. `http://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * *Note* that for a while uris without a `scheme` were accepted. That is not correct - * as all uris should have a scheme. To avoid breakage of existing code the optional - * `strict`-argument has been added. We *strongly* advise to use it, e.g. `Uri.parse('my:uri', true)` - * - * @see [Uri.toString](#Uri.toString) - * @param value The string value of an Uri. - * @param strict Throw an error when `value` is empty or when no `scheme` can be parsed. - * @return A new Uri instance. - */ - static parse(value: string, strict?: boolean): Uri; - - /** - * Create an URI from a file system path. The [scheme](#Uri.scheme) - * will be `file`. - * - * The *difference* between `Uri#parse` and `Uri#file` is that the latter treats the argument - * as path, not as stringified-uri. E.g. `Uri.file(path)` is *not* the same as - * `Uri.parse('file://' + path)` because the path might contain characters that are - * interpreted (# and ?). See the following sample: - * ```ts - const good = URI.file('/coding/c#/project1'); - good.scheme === 'file'; - good.path === '/coding/c#/project1'; - good.fragment === ''; - - const bad = URI.parse('file://' + '/coding/c#/project1'); - bad.scheme === 'file'; - bad.path === '/coding/c'; // path is now broken - bad.fragment === '/project1'; - ``` - * - * @param path A file system or UNC path. - * @return A new Uri instance. - */ - static file(path: string): Uri; - - /** - * Use the `file` and `parse` factory functions to create new `Uri` objects. - */ - private constructor(scheme: string, authority: string, path: string, query: string, fragment: string); - - /** - * Scheme is the `http` part of `http://www.msft.com/some/path?query#fragment`. - * The part before the first colon. - */ - readonly scheme: string; - - /** - * Authority is the `www.msft.com` part of `http://www.msft.com/some/path?query#fragment`. - * The part between the first double slashes and the next slash. - */ - readonly authority: string; - - /** - * Path is the `/some/path` part of `http://www.msft.com/some/path?query#fragment`. - */ - readonly path: string; - - /** - * Query is the `query` part of `http://www.msft.com/some/path?query#fragment`. - */ - readonly query: string; - - /** - * Fragment is the `fragment` part of `http://www.msft.com/some/path?query#fragment`. - */ - readonly fragment: string; - - /** - * The string representing the corresponding file system path of this Uri. - * - * Will handle UNC paths and normalize windows drive letters to lower-case. Also - * uses the platform specific path separator. - * - * * Will *not* validate the path for invalid characters and semantics. - * * Will *not* look at the scheme of this Uri. - * * The resulting string shall *not* be used for display purposes but - * for disk operations, like `readFile` et al. - * - * The *difference* to the [`path`](#Uri.path)-property is the use of the platform specific - * path separator and the handling of UNC paths. The sample below outlines the difference: - * ```ts - const u = URI.parse('file://server/c$/folder/file.txt') - u.authority === 'server' - u.path === '/shares/c$/file.txt' - u.fsPath === '\\server\c$\folder\file.txt' - ``` - */ - readonly fsPath: string; - - /** - * Derive a new Uri from this Uri. - * - * ```ts - * let file = Uri.parse('before:some/file/path'); - * let other = file.with({ scheme: 'after' }); - * assert.ok(other.toString() === 'after:some/file/path'); - * ``` - * - * @param change An object that describes a change to this Uri. To unset components use `null` or - * the empty string. - * @return A new Uri that reflects the given change. Will return `this` Uri if the change - * is not changing anything. - */ - with(change: { scheme?: string; authority?: string; path?: string; query?: string; fragment?: string }): Uri; - - /** - * Returns a string representation of this Uri. The representation and normalization - * of a URI depends on the scheme. - * - * * The resulting string can be safely used with [Uri.parse](#Uri.parse). - * * The resulting string shall *not* be used for display purposes. - * - * *Note* that the implementation will encode _aggressive_ which often leads to unexpected, - * but not incorrect, results. For instance, colons are encoded to `%3A` which might be unexpected - * in file-uri. Also `&` and `=` will be encoded which might be unexpected for http-uris. For stability - * reasons this cannot be changed anymore. If you suffer from too aggressive encoding you should use - * the `skipEncoding`-argument: `uri.toString(true)`. - * - * @param skipEncoding Do not percentage-encode the result, defaults to `false`. Note that - * the `#` and `?` characters occurring in the path will always be encoded. - * @returns A string representation of this Uri. - */ - toString(skipEncoding?: boolean): string; - - /** - * Returns a JSON representation of this Uri. - * - * @return An object. - */ - toJSON(): any; - } - - /** - * A cancellation token is passed to an asynchronous or long running - * operation to request cancellation, like cancelling a request - * for completion items because the user continued to type. - * - * To get an instance of a `CancellationToken` use a - * [CancellationTokenSource](#CancellationTokenSource). - */ - export interface CancellationToken { - - /** - * Is `true` when the token has been cancelled, `false` otherwise. - */ - isCancellationRequested: boolean; - - /** - * An [event](#Event) which fires upon cancellation. - */ - onCancellationRequested: Event; - } - - /** - * A cancellation source creates and controls a [cancellation token](#CancellationToken). - */ - export class CancellationTokenSource { - - /** - * The cancellation token of this source. - */ - token: CancellationToken; - - /** - * Signal cancellation on the token. - */ - cancel(): void; - - /** - * Dispose object and free resources. - */ - dispose(): void; - } - - /** - * Represents a type which can release resources, such - * as event listening or a timer. - */ - export class Disposable { - - /** - * Combine many disposable-likes into one. Use this method - * when having objects with a dispose function which are not - * instances of Disposable. - * - * @param disposableLikes Objects that have at least a `dispose`-function member. - * @return Returns a new disposable which, upon dispose, will - * dispose all provided disposables. - */ - static from(...disposableLikes: { dispose: () => any }[]): Disposable; - - /** - * Creates a new Disposable calling the provided function - * on dispose. - * @param callOnDispose Function that disposes something. - */ - constructor(callOnDispose: Function); - - /** - * Dispose this object. - */ - dispose(): any; - } - - /** - * Represents a typed event. - * - * A function that represents an event to which you subscribe by calling it with - * a listener function as argument. - * - * @sample `item.onDidChange(function(event) { console.log("Event happened: " + event); });` - */ - export interface Event { - - /** - * A function that represents an event to which you subscribe by calling it with - * a listener function as argument. - * - * @param listener The listener function will be called when the event happens. - * @param thisArgs The `this`-argument which will be used when calling the event listener. - * @param disposables An array to which a [disposable](#Disposable) will be added. - * @return A disposable which unsubscribes the event listener. - */ - (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; - } - - /** - * An event emitter can be used to create and manage an [event](#Event) for others - * to subscribe to. One emitter always owns one event. - * - * Use this class if you want to provide event from within your extension, for instance - * inside a [TextDocumentContentProvider](#TextDocumentContentProvider) or when providing - * API to other extensions. - */ - export class EventEmitter { - - /** - * The event listeners can subscribe to. - */ - event: Event; - - /** - * Notify all subscribers of the [event](#EventEmitter.event). Failure - * of one or more listener will not fail this function call. - * - * @param data The event object. - */ - fire(data?: T): void; - - /** - * Dispose this object and free resources. - */ - dispose(): void; - } - - /** - * A file system watcher notifies about changes to files and folders - * on disk. - * - * To get an instance of a `FileSystemWatcher` use - * [createFileSystemWatcher](#workspace.createFileSystemWatcher). - */ - export interface FileSystemWatcher extends Disposable { - - /** - * true if this file system watcher has been created such that - * it ignores creation file system events. - */ - ignoreCreateEvents: boolean; - - /** - * true if this file system watcher has been created such that - * it ignores change file system events. - */ - ignoreChangeEvents: boolean; - - /** - * true if this file system watcher has been created such that - * it ignores delete file system events. - */ - ignoreDeleteEvents: boolean; - - /** - * An event which fires on file/folder creation. - */ - onDidCreate: Event; - - /** - * An event which fires on file/folder change. - */ - onDidChange: Event; - - /** - * An event which fires on file/folder deletion. - */ - onDidDelete: Event; - } - - /** - * A text document content provider allows to add readonly documents - * to the editor, such as source from a dll or generated html from md. - * - * Content providers are [registered](#workspace.registerTextDocumentContentProvider) - * for a [uri-scheme](#Uri.scheme). When a uri with that scheme is to - * be [loaded](#workspace.openTextDocument) the content provider is - * asked. - */ - export interface TextDocumentContentProvider { - - /** - * An event to signal a resource has changed. - */ - onDidChange?: Event; - - /** - * Provide textual content for a given uri. - * - * The editor will use the returned string-content to create a readonly - * [document](#TextDocument). Resources allocated should be released when - * the corresponding document has been [closed](#workspace.onDidCloseTextDocument). - * - * **Note**: The contents of the created [document](#TextDocument) might not be - * identical to the provided text due to end-of-line-sequence normalization. - * - * @param uri An uri which scheme matches the scheme this provider was [registered](#workspace.registerTextDocumentContentProvider) for. - * @param token A cancellation token. - * @return A string or a thenable that resolves to such. - */ - provideTextDocumentContent(uri: Uri, token: CancellationToken): ProviderResult; - } - - /** - * Represents an item that can be selected from - * a list of items. - */ - export interface QuickPickItem { - - /** - * A human readable string which is rendered prominent. - */ - label: string; - - /** - * A human readable string which is rendered less prominent. - */ - description?: string; - - /** - * A human readable string which is rendered less prominent. - */ - detail?: string; - - /** - * Optional flag indicating if this item is picked initially. - * (Only honored when the picker allows multiple selections.) - * - * @see [QuickPickOptions.canPickMany](#QuickPickOptions.canPickMany) - */ - picked?: boolean; - - /** - * Always show this item. - */ - alwaysShow?: boolean; - } - - /** - * Options to configure the behavior of the quick pick UI. - */ - export interface QuickPickOptions { - /** - * An optional flag to include the description when filtering the picks. - */ - matchOnDescription?: boolean; - - /** - * An optional flag to include the detail when filtering the picks. - */ - matchOnDetail?: boolean; - - /** - * An optional string to show as place holder in the input box to guide the user what to pick on. - */ - placeHolder?: string; - - /** - * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window. - */ - ignoreFocusOut?: boolean; - - /** - * An optional flag to make the picker accept multiple selections, if true the result is an array of picks. - */ - canPickMany?: boolean; - - /** - * An optional function that is invoked whenever an item is selected. - */ - onDidSelectItem?(item: QuickPickItem | string): any; - } - - /** - * Options to configure the behaviour of the [workspace folder](#WorkspaceFolder) pick UI. - */ - export interface WorkspaceFolderPickOptions { - - /** - * An optional string to show as place holder in the input box to guide the user what to pick on. - */ - placeHolder?: string; - - /** - * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window. - */ - ignoreFocusOut?: boolean; - } - - /** - * Options to configure the behaviour of a file open dialog. - * - * * Note 1: A dialog can select files, folders, or both. This is not true for Windows - * which enforces to open either files or folder, but *not both*. - * * Note 2: Explicitly setting `canSelectFiles` and `canSelectFolders` to `false` is futile - * and the editor then silently adjusts the options to select files. - */ - export interface OpenDialogOptions { - /** - * The resource the dialog shows when opened. - */ - defaultUri?: Uri; - - /** - * A human-readable string for the open button. - */ - openLabel?: string; - - /** - * Allow to select files, defaults to `true`. - */ - canSelectFiles?: boolean; - - /** - * Allow to select folders, defaults to `false`. - */ - canSelectFolders?: boolean; - - /** - * Allow to select many files or folders. - */ - canSelectMany?: boolean; - - /** - * A set of file filters that are used by the dialog. Each entry is a human readable label, - * like "TypeScript", and an array of extensions, e.g. - * ```ts - * { - * 'Images': ['png', 'jpg'] - * 'TypeScript': ['ts', 'tsx'] - * } - * ``` - */ - filters?: { [name: string]: string[] }; - } - - /** - * Options to configure the behaviour of a file save dialog. - */ - export interface SaveDialogOptions { - /** - * The resource the dialog shows when opened. - */ - defaultUri?: Uri; - - /** - * A human-readable string for the save button. - */ - saveLabel?: string; - - /** - * A set of file filters that are used by the dialog. Each entry is a human readable label, - * like "TypeScript", and an array of extensions, e.g. - * ```ts - * { - * 'Images': ['png', 'jpg'] - * 'TypeScript': ['ts', 'tsx'] - * } - * ``` - */ - filters?: { [name: string]: string[] }; - } - - /** - * Represents an action that is shown with an information, warning, or - * error message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * @see [showWarningMessage](#window.showWarningMessage) - * @see [showErrorMessage](#window.showErrorMessage) - */ - export interface MessageItem { - - /** - * A short title like 'Retry', 'Open Log' etc. - */ - title: string; - - /** - * A hint for modal dialogs that the item should be triggered - * when the user cancels the dialog (e.g. by pressing the ESC - * key). - * - * Note: this option is ignored for non-modal messages. - */ - isCloseAffordance?: boolean; - } - - /** - * Options to configure the behavior of the message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * @see [showWarningMessage](#window.showWarningMessage) - * @see [showErrorMessage](#window.showErrorMessage) - */ - export interface MessageOptions { - - /** - * Indicates that this message should be modal. - */ - modal?: boolean; - } - - /** - * Options to configure the behavior of the input box UI. - */ - export interface InputBoxOptions { - - /** - * The value to prefill in the input box. - */ - value?: string; - - /** - * Selection of the prefilled [`value`](#InputBoxOptions.value). Defined as tuple of two number where the - * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole - * word will be selected, when empty (start equals end) only the cursor will be set, - * otherwise the defined range will be selected. - */ - valueSelection?: [number, number]; - - /** - * The text to display underneath the input box. - */ - prompt?: string; - - /** - * An optional string to show as place holder in the input box to guide the user what to type. - */ - placeHolder?: string; - - /** - * Set to `true` to show a password prompt that will not show the typed value. - */ - password?: boolean; - - /** - * Set to `true` to keep the input box open when focus moves to another part of the editor or to another window. - */ - ignoreFocusOut?: boolean; - - /** - * An optional function that will be called to validate input and to give a hint - * to the user. - * - * @param value The current value of the input box. - * @return A human readable string which is presented as diagnostic message. - * Return `undefined`, `null`, or the empty string when 'value' is valid. - */ - validateInput?(value: string): string | undefined | null | Thenable; - } - - /** - * A relative pattern is a helper to construct glob patterns that are matched - * relatively to a base path. The base path can either be an absolute file path - * or a [workspace folder](#WorkspaceFolder). - */ - export class RelativePattern { - - /** - * A base file path to which this pattern will be matched against relatively. - */ - base: string; - - /** - * A file glob pattern like `*.{ts,js}` that will be matched on file paths - * relative to the base path. - * - * Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`, - * the file glob pattern will match on `index.js`. - */ - pattern: string; - - /** - * Creates a new relative pattern object with a base path and pattern to match. This pattern - * will be matched on file paths relative to the base path. - * - * @param base A base file path to which this pattern will be matched against relatively. - * @param pattern A file glob pattern like `*.{ts,js}` that will be matched on file paths - * relative to the base path. - */ - constructor(base: WorkspaceFolder | string, pattern: string) - } - - /** - * A file glob pattern to match file paths against. This can either be a glob pattern string - * (like `**​/*.{ts,js}` or `*.{ts,js}`) or a [relative pattern](#RelativePattern). - * - * Glob patterns can have the following syntax: - * * `*` to match one or more characters in a path segment - * * `?` to match on one character in a path segment - * * `**` to match any number of path segments, including none - * * `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) - * * `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - * * `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) - * - * Note: a backslash (`\`) is not valid within a glob pattern. If you have an existing file - * path to match against, consider to use the [relative pattern](#RelativePattern) support - * that takes care of converting any backslash into slash. Otherwise, make sure to convert - * any backslash to slash when creating the glob pattern. - */ - export type GlobPattern = string | RelativePattern; - - /** - * A document filter denotes a document by different properties like - * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of - * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName). - * - * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` - * @sample A language filter that applies to all package.json paths: `{ language: 'json', scheme: 'untitled', pattern: '**​/package.json' }` - */ - export interface DocumentFilter { - - /** - * A language id, like `typescript`. - */ - language?: string; - - /** - * A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - */ - scheme?: string; - - /** - * A [glob pattern](#GlobPattern) that is matched on the absolute path of the document. Use a [relative pattern](#RelativePattern) - * to filter documents to a [workspace folder](#WorkspaceFolder). - */ - pattern?: GlobPattern; - } - - /** - * A language selector is the combination of one or many language identifiers - * and [language filters](#DocumentFilter). - * - * *Note* that a document selector that is just a language identifier selects *all* - * documents, even those that are not saved on disk. Only use such selectors when - * a feature works without further context, e.g. without the need to resolve related - * 'files'. - * - * @sample `let sel:DocumentSelector = { scheme: 'file', language: 'typescript' }`; - */ - export type DocumentSelector = DocumentFilter | string | Array; - - /** - * A provider result represents the values a provider, like the [`HoverProvider`](#HoverProvider), - * may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves - * to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a - * thenable. - * - * The snippets below are all valid implementations of the [`HoverProvider`](#HoverProvider): - * - * ```ts - * let a: HoverProvider = { - * provideHover(doc, pos, token): ProviderResult { - * return new Hover('Hello World'); - * } - * } - * - * let b: HoverProvider = { - * provideHover(doc, pos, token): ProviderResult { - * return new Promise(resolve => { - * resolve(new Hover('Hello World')); - * }); - * } - * } - * - * let c: HoverProvider = { - * provideHover(doc, pos, token): ProviderResult { - * return; // undefined - * } - * } - * ``` - */ - export type ProviderResult = T | undefined | null | Thenable; - - /** - * Kind of a code action. - * - * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. - * - * Code action kinds are used by VS Code for UI elements such as the refactoring context menu. Users - * can also trigger code actions with a specific kind with the `editor.action.codeAction` command. - */ - export class CodeActionKind { - /** - * Empty kind. - */ - static readonly Empty: CodeActionKind; - - /** - * Base kind for quickfix actions: `quickfix`. - * - * Quick fix actions address a problem in the code and are shown in the normal code action context menu. - */ - static readonly QuickFix: CodeActionKind; - - /** - * Base kind for refactoring actions: `refactor` - * - * Refactoring actions are shown in the refactoring context menu. - */ - static readonly Refactor: CodeActionKind; - - /** - * Base kind for refactoring extraction actions: `refactor.extract` - * - * Example extract actions: - * - * - Extract method - * - Extract function - * - Extract variable - * - Extract interface from class - * - ... - */ - static readonly RefactorExtract: CodeActionKind; - - /** - * Base kind for refactoring inline actions: `refactor.inline` - * - * Example inline actions: - * - * - Inline function - * - Inline variable - * - Inline constant - * - ... - */ - static readonly RefactorInline: CodeActionKind; - - /** - * Base kind for refactoring rewrite actions: `refactor.rewrite` - * - * Example rewrite actions: - * - * - Convert JavaScript function to class - * - Add or remove parameter - * - Encapsulate field - * - Make method static - * - Move method to base class - * - ... - */ - static readonly RefactorRewrite: CodeActionKind; - - /** - * Base kind for source actions: `source` - * - * Source code actions apply to the entire file and can be run on save - * using `editor.codeActionsOnSave`. They also are shown in `source` context menu. - */ - static readonly Source: CodeActionKind; - - /** - * Base kind for an organize imports source action: `source.organizeImports`. - */ - static readonly SourceOrganizeImports: CodeActionKind; - - /** - * Base kind for auto-fix source actions: `source.fixAll`. - * - * Fix all actions automatically fix errors that have a clear fix that do not require user input. - * They should not suppress errors or perform unsafe fixes such as generating new types or classes. - */ - static readonly SourceFixAll: CodeActionKind; - - private constructor(value: string); - - /** - * String value of the kind, e.g. `"refactor.extract.function"`. - */ - readonly value: string; - - /** - * Create a new kind by appending a more specific selector to the current kind. - * - * Does not modify the current kind. - */ - append(parts: string): CodeActionKind; - - /** - * Checks if this code action kind intersects `other`. - * - * The kind `"refactor.extract"` for example intersects `refactor`, `"refactor.extract"` and ``"refactor.extract.function"`, - * but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"`. - * - * @param other Kind to check. - */ - intersects(other: CodeActionKind): boolean; - - /** - * Checks if `other` is a sub-kind of this `CodeActionKind`. - * - * The kind `"refactor.extract"` for example contains `"refactor.extract"` and ``"refactor.extract.function"`, - * but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"` or `refactor`. - * - * @param other Kind to check. - */ - contains(other: CodeActionKind): boolean; - } - - /** - * Contains additional diagnostic information about the context in which - * a [code action](#CodeActionProvider.provideCodeActions) is run. - */ - export interface CodeActionContext { - /** - * An array of diagnostics. - */ - readonly diagnostics: ReadonlyArray; - - /** - * Requested kind of actions to return. - * - * Actions not of this kind are filtered out before being shown by the lightbulb. - */ - readonly only?: CodeActionKind; - } - - /** - * A code action represents a change that can be performed in code, e.g. to fix a problem or - * to refactor code. - * - * A CodeAction must set either [`edit`](#CodeAction.edit) and/or a [`command`](#CodeAction.command). If both are supplied, the `edit` is applied first, then the command is executed. - */ - export class CodeAction { - - /** - * A short, human-readable, title for this code action. - */ - title: string; - - /** - * A [workspace edit](#WorkspaceEdit) this code action performs. - */ - edit?: WorkspaceEdit; - - /** - * [Diagnostics](#Diagnostic) that this code action resolves. - */ - diagnostics?: Diagnostic[]; - - /** - * A [command](#Command) this code action executes. - */ - command?: Command; - - /** - * [Kind](#CodeActionKind) of the code action. - * - * Used to filter code actions. - */ - kind?: CodeActionKind; - - /** - * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted - * by keybindings. - * - * A quick fix should be marked preferred if it properly addresses the underlying error. - * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. - */ - isPreferred?: boolean; - - /** - * Creates a new code action. - * - * A code action must have at least a [title](#CodeAction.title) and [edits](#CodeAction.edit) - * and/or a [command](#CodeAction.command). - * - * @param title The title of the code action. - * @param kind The kind of the code action. - */ - constructor(title: string, kind?: CodeActionKind); - } - - /** - * The code action interface defines the contract between extensions and - * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature. - * - * A code action can be any command that is [known](#commands.getCommands) to the system. - */ - export interface CodeActionProvider { - /** - * Provide commands for the given document and range. - * - * @param document The document in which the command was invoked. - * @param range The selector or range for which the command was invoked. This will always be a selection if - * there is a currently active editor. - * @param context Context carrying additional information. - * @param token A cancellation token. - * @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | CodeAction)[]>; - } - - /** - * Metadata about the type of code actions that a [CodeActionProvider](#CodeActionProvider) providers - */ - export interface CodeActionProviderMetadata { - /** - * [CodeActionKinds](#CodeActionKind) that this provider may return. - * - * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the provider - * may list our every specific kind they provide, such as `CodeActionKind.Refactor.Extract.append('function`)` - */ - readonly providedCodeActionKinds?: ReadonlyArray; - } - - /** - * A code lens represents a [command](#Command) that should be shown along with - * source text, like the number of references, a way to run tests, etc. - * - * A code lens is _unresolved_ when no command is associated to it. For performance - * reasons the creation of a code lens and resolving should be done to two stages. - * - * @see [CodeLensProvider.provideCodeLenses](#CodeLensProvider.provideCodeLenses) - * @see [CodeLensProvider.resolveCodeLens](#CodeLensProvider.resolveCodeLens) - */ - export class CodeLens { - - /** - * The range in which this code lens is valid. Should only span a single line. - */ - range: Range; - - /** - * The command this code lens represents. - */ - command?: Command; - - /** - * `true` when there is a command associated. - */ - readonly isResolved: boolean; - - /** - * Creates a new code lens object. - * - * @param range The range to which this code lens applies. - * @param command The command associated to this code lens. - */ - constructor(range: Range, command?: Command); - } - - /** - * A code lens provider adds [commands](#Command) to source text. The commands will be shown - * as dedicated horizontal lines in between the source text. - */ - export interface CodeLensProvider { - - /** - * An optional event to signal that the code lenses from this provider have changed. - */ - onDidChangeCodeLenses?: Event; - - /** - * Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if - * computing the commands is expensive implementors should only return code lens objects with the - * range set and implement [resolve](#CodeLensProvider.resolveCodeLens). - * - * @param document The document in which the command was invoked. - * @param token A cancellation token. - * @return An array of code lenses or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult; - - /** - * This function will be called for each visible code lens, usually when scrolling and after - * calls to [compute](#CodeLensProvider.provideCodeLenses)-lenses. - * - * @param codeLens code lens that must be resolved. - * @param token A cancellation token. - * @return The given, resolved code lens or thenable that resolves to such. - */ - resolveCodeLens?(codeLens: CodeLens, token: CancellationToken): ProviderResult; - } - - /** - * Information about where a symbol is defined. - * - * Provides additional metadata over normal [location](#Location) definitions, including the range of - * the defining symbol - */ - export type DefinitionLink = LocationLink; - - /** - * The definition of a symbol represented as one or many [locations](#Location). - * For most programming languages there is only one location at which a symbol is - * defined. - */ - export type Definition = Location | Location[]; - - /** - * The definition provider interface defines the contract between extensions and - * the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition) - * and peek definition features. - */ - export interface DefinitionProvider { - - /** - * Provide the definition of the symbol at the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return A definition or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideDefinition(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * The implementation provider interface defines the contract between extensions and - * the go to implementation feature. - */ - export interface ImplementationProvider { - - /** - * Provide the implementations of the symbol at the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return A definition or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideImplementation(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * The type definition provider defines the contract between extensions and - * the go to type definition feature. - */ - export interface TypeDefinitionProvider { - - /** - * Provide the type definition of the symbol at the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return A definition or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideTypeDefinition(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * The declaration of a symbol representation as one or many [locations](#Location) - * or [location links][#LocationLink]. - */ - export type Declaration = Location | Location[] | LocationLink[]; - - /** - * The declaration provider interface defines the contract between extensions and - * the go to declaration feature. - */ - export interface DeclarationProvider { - - /** - * Provide the declaration of the symbol at the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return A declaration or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideDeclaration(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * The MarkdownString represents human readable text that supports formatting via the - * markdown syntax. Standard markdown is supported, also tables, but no embedded html. - */ - export class MarkdownString { - - /** - * The markdown string. - */ - value: string; - - /** - * Indicates that this markdown string is from a trusted source. Only *trusted* - * markdown supports links that execute commands, e.g. `[Run it](command:myCommandId)`. - */ - isTrusted?: boolean; - - /** - * Creates a new markdown string with the given value. - * - * @param value Optional, initial value. - */ - constructor(value?: string); - - /** - * Appends and escapes the given string to this markdown string. - * @param value Plain text. - */ - appendText(value: string): MarkdownString; - - /** - * Appends the given string 'as is' to this markdown string. - * @param value Markdown string. - */ - appendMarkdown(value: string): MarkdownString; - - /** - * Appends the given string as codeblock using the provided language. - * @param value A code snippet. - * @param language An optional [language identifier](#languages.getLanguages). - */ - appendCodeblock(value: string, language?: string): MarkdownString; - } - - /** - * ~~MarkedString can be used to render human readable text. It is either a markdown string - * or a code-block that provides a language and a code snippet. Note that - * markdown strings will be sanitized - that means html will be escaped.~~ - * - * @deprecated This type is deprecated, please use [`MarkdownString`](#MarkdownString) instead. - */ - export type MarkedString = MarkdownString | string | { language: string; value: string }; - - /** - * A hover represents additional information for a symbol or word. Hovers are - * rendered in a tooltip-like widget. - */ - export class Hover { - - /** - * The contents of this hover. - */ - contents: MarkedString[]; - - /** - * The range to which this hover applies. When missing, the - * editor will use the range at the current position or the - * current position itself. - */ - range?: Range; - - /** - * Creates a new hover object. - * - * @param contents The contents of the hover. - * @param range The range to which the hover applies. - */ - constructor(contents: MarkedString | MarkedString[], range?: Range); - } - - /** - * The hover provider interface defines the contract between extensions and - * the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature. - */ - export interface HoverProvider { - - /** - * Provide a hover for the given position and document. Multiple hovers at the same - * position will be merged by the editor. A hover can have a range which defaults - * to the word range at the position when omitted. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return A hover or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideHover(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * A document highlight kind. - */ - export enum DocumentHighlightKind { - - /** - * A textual occurrence. - */ - Text = 0, - - /** - * Read-access of a symbol, like reading a variable. - */ - Read = 1, - - /** - * Write-access of a symbol, like writing to a variable. - */ - Write = 2 - } - - /** - * A document highlight is a range inside a text document which deserves - * special attention. Usually a document highlight is visualized by changing - * the background color of its range. - */ - export class DocumentHighlight { - - /** - * The range this highlight applies to. - */ - range: Range; - - /** - * The highlight kind, default is [text](#DocumentHighlightKind.Text). - */ - kind?: DocumentHighlightKind; - - /** - * Creates a new document highlight object. - * - * @param range The range the highlight applies to. - * @param kind The highlight kind, default is [text](#DocumentHighlightKind.Text). - */ - constructor(range: Range, kind?: DocumentHighlightKind); - } - - /** - * The document highlight provider interface defines the contract between extensions and - * the word-highlight-feature. - */ - export interface DocumentHighlightProvider { - - /** - * Provide a set of document highlights, like all occurrences of a variable or - * all exit-points of a function. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentHighlights(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * A symbol kind. - */ - export enum SymbolKind { - File = 0, - Module = 1, - Namespace = 2, - Package = 3, - Class = 4, - Method = 5, - Property = 6, - Field = 7, - Constructor = 8, - Enum = 9, - Interface = 10, - Function = 11, - Variable = 12, - Constant = 13, - String = 14, - Number = 15, - Boolean = 16, - Array = 17, - Object = 18, - Key = 19, - Null = 20, - EnumMember = 21, - Struct = 22, - Event = 23, - Operator = 24, - TypeParameter = 25 - } - - - /** - * Symbol tags are extra annotations that tweak the rendering of a symbol. - */ - export enum SymbolTag { - - /** - * Render a symbol as obsolete, usually using a strike-out. - */ - Deprecated = 1 - } - - /** - * Represents information about programming constructs like variables, classes, - * interfaces etc. - */ - export class SymbolInformation { - - /** - * The name of this symbol. - */ - name: string; - - /** - * The name of the symbol containing this symbol. - */ - containerName: string; - - /** - * The kind of this symbol. - */ - kind: SymbolKind; - - /** - * Tags for this symbol. - */ - tags?: ReadonlyArray; - - /** - * The location of this symbol. - */ - location: Location; - - /** - * Creates a new symbol information object. - * - * @param name The name of the symbol. - * @param kind The kind of the symbol. - * @param containerName The name of the symbol containing the symbol. - * @param location The location of the symbol. - */ - constructor(name: string, kind: SymbolKind, containerName: string, location: Location); - - /** - * ~~Creates a new symbol information object.~~ - * - * @deprecated Please use the constructor taking a [location](#Location) object. - * - * @param name The name of the symbol. - * @param kind The kind of the symbol. - * @param range The range of the location of the symbol. - * @param uri The resource of the location of symbol, defaults to the current document. - * @param containerName The name of the symbol containing the symbol. - */ - constructor(name: string, kind: SymbolKind, range: Range, uri?: Uri, containerName?: string); - } - - /** - * Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document - * symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to - * its most interesting range, e.g. the range of an identifier. - */ - export class DocumentSymbol { - - /** - * The name of this symbol. - */ - name: string; - - /** - * More detail for this symbol, e.g. the signature of a function. - */ - detail: string; - - /** - * The kind of this symbol. - */ - kind: SymbolKind; - - /** - * Tags for this symbol. - */ - tags?: ReadonlyArray; - - /** - * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. - */ - range: Range; - - /** - * The range that should be selected and reveal when this symbol is being picked, e.g. the name of a function. - * Must be contained by the [`range`](#DocumentSymbol.range). - */ - selectionRange: Range; - - /** - * Children of this symbol, e.g. properties of a class. - */ - children: DocumentSymbol[]; - - /** - * Creates a new document symbol. - * - * @param name The name of the symbol. - * @param detail Details for the symbol. - * @param kind The kind of the symbol. - * @param range The full range of the symbol. - * @param selectionRange The range that should be reveal. - */ - constructor(name: string, detail: string, kind: SymbolKind, range: Range, selectionRange: Range); - } - - /** - * The document symbol provider interface defines the contract between extensions and - * the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature. - */ - export interface DocumentSymbolProvider { - - /** - * Provide symbol information for the given document. - * - * @param document The document in which the command was invoked. - * @param token A cancellation token. - * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentSymbols(document: TextDocument, token: CancellationToken): ProviderResult; - } - - /** - * Metadata about a document symbol provider. - */ - export interface DocumentSymbolProviderMetadata { - /** - * A human readable string that is shown when multiple outlines trees show for one document. - */ - label?: string; - } - - /** - * The workspace symbol provider interface defines the contract between extensions and - * the [symbol search](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name)-feature. - */ - export interface WorkspaceSymbolProvider { - - /** - * Project-wide search for a symbol matching the given query string. - * - * The `query`-parameter should be interpreted in a *relaxed way* as the editor will apply its own highlighting - * and scoring on the results. A good rule of thumb is to match case-insensitive and to simply check that the - * characters of *query* appear in their order in a candidate symbol. Don't use prefix, substring, or similar - * strict matching. - * - * To improve performance implementors can implement `resolveWorkspaceSymbol` and then provide symbols with partial - * [location](#SymbolInformation.location)-objects, without a `range` defined. The editor will then call - * `resolveWorkspaceSymbol` for selected symbols only, e.g. when opening a workspace symbol. - * - * @param query A query string, can be the empty string in which case all symbols should be returned. - * @param token A cancellation token. - * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideWorkspaceSymbols(query: string, token: CancellationToken): ProviderResult; - - /** - * Given a symbol fill in its [location](#SymbolInformation.location). This method is called whenever a symbol - * is selected in the UI. Providers can implement this method and return incomplete symbols from - * [`provideWorkspaceSymbols`](#WorkspaceSymbolProvider.provideWorkspaceSymbols) which often helps to improve - * performance. - * - * @param symbol The symbol that is to be resolved. Guaranteed to be an instance of an object returned from an - * earlier call to `provideWorkspaceSymbols`. - * @param token A cancellation token. - * @return The resolved symbol or a thenable that resolves to that. When no result is returned, - * the given `symbol` is used. - */ - resolveWorkspaceSymbol?(symbol: SymbolInformation, token: CancellationToken): ProviderResult; - } - - /** - * Value-object that contains additional information when - * requesting references. - */ - export interface ReferenceContext { - - /** - * Include the declaration of the current symbol. - */ - includeDeclaration: boolean; - } - - /** - * The reference provider interface defines the contract between extensions and - * the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature. - */ - export interface ReferenceProvider { - - /** - * Provide a set of project-wide references for the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * - * @return An array of locations or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideReferences(document: TextDocument, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult; - } - - /** - * A text edit represents edits that should be applied - * to a document. - */ - export class TextEdit { - - /** - * Utility to create a replace edit. - * - * @param range A range. - * @param newText A string. - * @return A new text edit object. - */ - static replace(range: Range, newText: string): TextEdit; - - /** - * Utility to create an insert edit. - * - * @param position A position, will become an empty range. - * @param newText A string. - * @return A new text edit object. - */ - static insert(position: Position, newText: string): TextEdit; - - /** - * Utility to create a delete edit. - * - * @param range A range. - * @return A new text edit object. - */ - static delete(range: Range): TextEdit; - - /** - * Utility to create an eol-edit. - * - * @param eol An eol-sequence - * @return A new text edit object. - */ - static setEndOfLine(eol: EndOfLine): TextEdit; - - /** - * The range this edit applies to. - */ - range: Range; - - /** - * The string this edit will insert. - */ - newText: string; - - /** - * The eol-sequence used in the document. - * - * *Note* that the eol-sequence will be applied to the - * whole document. - */ - newEol?: EndOfLine; - - /** - * Create a new TextEdit. - * - * @param range A range. - * @param newText A string. - */ - constructor(range: Range, newText: string); - } - - /** - * A workspace edit is a collection of textual and files changes for - * multiple resources and documents. - * - * Use the [applyEdit](#workspace.applyEdit)-function to apply a workspace edit. - */ - export class WorkspaceEdit { - - /** - * The number of affected resources of textual or resource changes. - */ - readonly size: number; - - /** - * Replace the given range with given text for the given resource. - * - * @param uri A resource identifier. - * @param range A range. - * @param newText A string. - */ - replace(uri: Uri, range: Range, newText: string): void; - - /** - * Insert the given text at the given position. - * - * @param uri A resource identifier. - * @param position A position. - * @param newText A string. - */ - insert(uri: Uri, position: Position, newText: string): void; - - /** - * Delete the text at the given range. - * - * @param uri A resource identifier. - * @param range A range. - */ - delete(uri: Uri, range: Range): void; - - /** - * Check if a text edit for a resource exists. - * - * @param uri A resource identifier. - * @return `true` if the given resource will be touched by this edit. - */ - has(uri: Uri): boolean; - - /** - * Set (and replace) text edits for a resource. - * - * @param uri A resource identifier. - * @param edits An array of text edits. - */ - set(uri: Uri, edits: TextEdit[]): void; - - /** - * Get the text edits for a resource. - * - * @param uri A resource identifier. - * @return An array of text edits. - */ - get(uri: Uri): TextEdit[]; - - /** - * Create a regular file. - * - * @param uri Uri of the new file.. - * @param options Defines if an existing file should be overwritten or be - * ignored. When overwrite and ignoreIfExists are both set overwrite wins. - */ - createFile(uri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }): void; - - /** - * Delete a file or folder. - * - * @param uri The uri of the file that is to be deleted. - */ - deleteFile(uri: Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }): void; - - /** - * Rename a file or folder. - * - * @param oldUri The existing file. - * @param newUri The new location. - * @param options Defines if existing files should be overwritten or be - * ignored. When overwrite and ignoreIfExists are both set overwrite wins. - */ - renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }): void; - - - /** - * Get all text edits grouped by resource. - * - * @return A shallow copy of `[Uri, TextEdit[]]`-tuples. - */ - entries(): [Uri, TextEdit[]][]; - } - - /** - * A snippet string is a template which allows to insert text - * and to control the editor cursor when insertion happens. - * - * A snippet can define tab stops and placeholders with `$1`, `$2` - * and `${3:foo}`. `$0` defines the final tab stop, it defaults to - * the end of the snippet. Variables are defined with `$name` and - * `${name:default value}`. The full snippet syntax is documented - * [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets). - */ - export class SnippetString { - - /** - * The snippet string. - */ - value: string; - - constructor(value?: string); - - /** - * Builder-function that appends the given string to - * the [`value`](#SnippetString.value) of this snippet string. - * - * @param string A value to append 'as given'. The string will be escaped. - * @return This snippet string. - */ - appendText(string: string): SnippetString; - - /** - * Builder-function that appends a tabstop (`$1`, `$2` etc) to - * the [`value`](#SnippetString.value) of this snippet string. - * - * @param number The number of this tabstop, defaults to an auto-increment - * value starting at 1. - * @return This snippet string. - */ - appendTabstop(number?: number): SnippetString; - - /** - * Builder-function that appends a placeholder (`${1:value}`) to - * the [`value`](#SnippetString.value) of this snippet string. - * - * @param value The value of this placeholder - either a string or a function - * with which a nested snippet can be created. - * @param number The number of this tabstop, defaults to an auto-increment - * value starting at 1. - * @return This snippet string. - */ - appendPlaceholder(value: string | ((snippet: SnippetString) => any), number?: number): SnippetString; - - /** - * Builder-function that appends a variable (`${VAR}`) to - * the [`value`](#SnippetString.value) of this snippet string. - * - * @param name The name of the variable - excluding the `$`. - * @param defaultValue The default value which is used when the variable name cannot - * be resolved - either a string or a function with which a nested snippet can be created. - * @return This snippet string. - */ - appendVariable(name: string, defaultValue: string | ((snippet: SnippetString) => any)): SnippetString; - } - - /** - * The rename provider interface defines the contract between extensions and - * the [rename](https://code.visualstudio.com/docs/editor/editingevolved#_rename-symbol)-feature. - */ - export interface RenameProvider { - - /** - * Provide an edit that describes changes that have to be made to one - * or many resources to rename a symbol to a different name. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param newName The new name of the symbol. If the given name is not valid, the provider must return a rejected promise. - * @param token A cancellation token. - * @return A workspace edit or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideRenameEdits(document: TextDocument, position: Position, newName: string, token: CancellationToken): ProviderResult; - - /** - * Optional function for resolving and validating a position *before* running rename. The result can - * be a range or a range and a placeholder text. The placeholder text should be the identifier of the symbol - * which is being renamed - when omitted the text in the returned range is used. - * - * @param document The document in which rename will be invoked. - * @param position The position at which rename will be invoked. - * @param token A cancellation token. - * @return The range or range and placeholder text of the identifier that is to be renamed. The lack of a result can signaled by returning `undefined` or `null`. - */ - prepareRename?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; - } - - /** - * Value-object describing what options formatting should use. - */ - export interface FormattingOptions { - - /** - * Size of a tab in spaces. - */ - tabSize: number; - - /** - * Prefer spaces over tabs. - */ - insertSpaces: boolean; - - /** - * Signature for further properties. - */ - [key: string]: boolean | number | string; - } - - /** - * The document formatting provider interface defines the contract between extensions and - * the formatting-feature. - */ - export interface DocumentFormattingEditProvider { - - /** - * Provide formatting edits for a whole document. - * - * @param document The document in which the command was invoked. - * @param options Options controlling formatting. - * @param token A cancellation token. - * @return A set of text edits or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentFormattingEdits(document: TextDocument, options: FormattingOptions, token: CancellationToken): ProviderResult; - } - - /** - * The document formatting provider interface defines the contract between extensions and - * the formatting-feature. - */ - export interface DocumentRangeFormattingEditProvider { - - /** - * Provide formatting edits for a range in a document. - * - * The given range is a hint and providers can decide to format a smaller - * or larger range. Often this is done by adjusting the start and end - * of the range to full syntax nodes. - * - * @param document The document in which the command was invoked. - * @param range The range which should be formatted. - * @param options Options controlling formatting. - * @param token A cancellation token. - * @return A set of text edits or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentRangeFormattingEdits(document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult; - } - - /** - * The document formatting provider interface defines the contract between extensions and - * the formatting-feature. - */ - export interface OnTypeFormattingEditProvider { - - /** - * Provide formatting edits after a character has been typed. - * - * The given position and character should hint to the provider - * what range the position to expand to, like find the matching `{` - * when `}` has been entered. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param ch The character that has been typed. - * @param options Options controlling formatting. - * @param token A cancellation token. - * @return A set of text edits or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined`, `null`, or an empty array. - */ - provideOnTypeFormattingEdits(document: TextDocument, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult; - } - - /** - * Represents a parameter of a callable-signature. A parameter can - * have a label and a doc-comment. - */ - export class ParameterInformation { - - /** - * The label of this signature. - * - * Either a string or inclusive start and exclusive end offsets within its containing - * [signature label](#SignatureInformation.label). *Note*: A label of type string must be - * a substring of its containing signature information's [label](#SignatureInformation.label). - */ - label: string | [number, number]; - - /** - * The human-readable doc-comment of this signature. Will be shown - * in the UI but can be omitted. - */ - documentation?: string | MarkdownString; - - /** - * Creates a new parameter information object. - * - * @param label A label string or inclusive start and exclusive end offsets within its containing signature label. - * @param documentation A doc string. - */ - constructor(label: string | [number, number], documentation?: string | MarkdownString); - } - - /** - * Represents the signature of something callable. A signature - * can have a label, like a function-name, a doc-comment, and - * a set of parameters. - */ - export class SignatureInformation { - - /** - * The label of this signature. Will be shown in - * the UI. - */ - label: string; - - /** - * The human-readable doc-comment of this signature. Will be shown - * in the UI but can be omitted. - */ - documentation?: string | MarkdownString; - - /** - * The parameters of this signature. - */ - parameters: ParameterInformation[]; - - /** - * Creates a new signature information object. - * - * @param label A label string. - * @param documentation A doc string. - */ - constructor(label: string, documentation?: string | MarkdownString); - } - - /** - * Signature help represents the signature of something - * callable. There can be multiple signatures but only one - * active and only one active parameter. - */ - export class SignatureHelp { - - /** - * One or more signatures. - */ - signatures: SignatureInformation[]; - - /** - * The active signature. - */ - activeSignature: number; - - /** - * The active parameter of the active signature. - */ - activeParameter: number; - } - - /** - * How a [`SignatureHelpProvider`](#SignatureHelpProvider) was triggered. - */ - export enum SignatureHelpTriggerKind { - /** - * Signature help was invoked manually by the user or by a command. - */ - Invoke = 1, - - /** - * Signature help was triggered by a trigger character. - */ - TriggerCharacter = 2, - - /** - * Signature help was triggered by the cursor moving or by the document content changing. - */ - ContentChange = 3, - } - - /** - * Additional information about the context in which a - * [`SignatureHelpProvider`](#SignatureHelpProvider.provideSignatureHelp) was triggered. - */ - export interface SignatureHelpContext { - /** - * Action that caused signature help to be triggered. - */ - readonly triggerKind: SignatureHelpTriggerKind; - - /** - * Character that caused signature help to be triggered. - * - * This is `undefined` when signature help is not triggered by typing, such as when manually invoking - * signature help or when moving the cursor. - */ - readonly triggerCharacter?: string; - - /** - * `true` if signature help was already showing when it was triggered. - * - * Retriggers occur when the signature help is already active and can be caused by actions such as - * typing a trigger character, a cursor move, or document content changes. - */ - readonly isRetrigger: boolean; - - /** - * The currently active [`SignatureHelp`](#SignatureHelp). - * - * The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on - * the user arrowing through available signatures. - */ - readonly activeSignatureHelp?: SignatureHelp; - } - - /** - * The signature help provider interface defines the contract between extensions and - * the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature. - */ - export interface SignatureHelpProvider { - - /** - * Provide help for the signature at the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @param context Information about how signature help was triggered. - * - * @return Signature help or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideSignatureHelp(document: TextDocument, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult; - } - - /** - * Metadata about a registered [`SignatureHelpProvider`](#SignatureHelpProvider). - */ - export interface SignatureHelpProviderMetadata { - /** - * List of characters that trigger signature help. - */ - readonly triggerCharacters: ReadonlyArray; - - /** - * List of characters that re-trigger signature help. - * - * These trigger characters are only active when signature help is already showing. All trigger characters - * are also counted as re-trigger characters. - */ - readonly retriggerCharacters: ReadonlyArray; - } - - /** - * Completion item kinds. - */ - export enum CompletionItemKind { - Text = 0, - Method = 1, - Function = 2, - Constructor = 3, - Field = 4, - Variable = 5, - Class = 6, - Interface = 7, - Module = 8, - Property = 9, - Unit = 10, - Value = 11, - Enum = 12, - Keyword = 13, - Snippet = 14, - Color = 15, - Reference = 17, - File = 16, - Folder = 18, - EnumMember = 19, - Constant = 20, - Struct = 21, - Event = 22, - Operator = 23, - TypeParameter = 24 - } - - /** - * Completion item tags are extra annotations that tweak the rendering of a completion - * item. - */ - export enum CompletionItemTag { - /** - * Render a completion as obsolete, usually using a strike-out. - */ - Deprecated = 1 - } - - /** - * A completion item represents a text snippet that is proposed to complete text that is being typed. - * - * It is sufficient to create a completion item from just a [label](#CompletionItem.label). In that - * case the completion item will replace the [word](#TextDocument.getWordRangeAtPosition) - * until the cursor with the given label or [insertText](#CompletionItem.insertText). Otherwise the - * given [edit](#CompletionItem.textEdit) is used. - * - * When selecting a completion item in the editor its defined or synthesized text edit will be applied - * to *all* cursors/selections whereas [additionalTextEdits](#CompletionItem.additionalTextEdits) will be - * applied as provided. - * - * @see [CompletionItemProvider.provideCompletionItems](#CompletionItemProvider.provideCompletionItems) - * @see [CompletionItemProvider.resolveCompletionItem](#CompletionItemProvider.resolveCompletionItem) - */ - export class CompletionItem { - - /** - * The label of this completion item. By default - * this is also the text that is inserted when selecting - * this completion. - */ - label: string; - - /** - * The kind of this completion item. Based on the kind - * an icon is chosen by the editor. - */ - kind?: CompletionItemKind; - - /** - * Tags for this completion item. - */ - tags?: ReadonlyArray; - - /** - * A human-readable string with additional information - * about this item, like type or symbol information. - */ - detail?: string; - - /** - * A human-readable string that represents a doc-comment. - */ - documentation?: string | MarkdownString; - - /** - * A string that should be used when comparing this item - * with other items. When `falsy` the [label](#CompletionItem.label) - * is used. - */ - sortText?: string; - - /** - * A string that should be used when filtering a set of - * completion items. When `falsy` the [label](#CompletionItem.label) - * is used. - */ - filterText?: string; - - /** - * Select this item when showing. *Note* that only one completion item can be selected and - * that the editor decides which item that is. The rule is that the *first* item of those - * that match best is selected. - */ - preselect?: boolean; - - /** - * A string or snippet that should be inserted in a document when selecting - * this completion. When `falsy` the [label](#CompletionItem.label) - * is used. - */ - insertText?: string | SnippetString; - - /** - * A range of text that should be replaced by this completion item. - * - * Defaults to a range from the start of the [current word](#TextDocument.getWordRangeAtPosition) to the - * current position. - * - * *Note:* The range must be a [single line](#Range.isSingleLine) and it must - * [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems). - */ - range?: Range; - - /** - * An optional set of characters that when pressed while this completion is active will accept it first and - * then type that character. *Note* that all commit characters should have `length=1` and that superfluous - * characters will be ignored. - */ - commitCharacters?: string[]; - - /** - * Keep whitespace of the [insertText](#CompletionItem.insertText) as is. By default, the editor adjusts leading - * whitespace of new lines so that they match the indentation of the line for which the item is accepted - setting - * this to `true` will prevent that. - */ - keepWhitespace?: boolean; - - /** - * @deprecated Use `CompletionItem.insertText` and `CompletionItem.range` instead. - * - * ~~An [edit](#TextEdit) which is applied to a document when selecting - * this completion. When an edit is provided the value of - * [insertText](#CompletionItem.insertText) is ignored.~~ - * - * ~~The [range](#Range) of the edit must be single-line and on the same - * line completions were [requested](#CompletionItemProvider.provideCompletionItems) at.~~ - */ - textEdit?: TextEdit; - - /** - * An optional array of additional [text edits](#TextEdit) that are applied when - * selecting this completion. Edits must not overlap with the main [edit](#CompletionItem.textEdit) - * nor with themselves. - */ - additionalTextEdits?: TextEdit[]; - - /** - * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that - * additional modifications to the current document should be described with the - * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. - */ - command?: Command; - - /** - * Creates a new completion item. - * - * Completion items must have at least a [label](#CompletionItem.label) which then - * will be used as insert text as well as for sorting and filtering. - * - * @param label The label of the completion. - * @param kind The [kind](#CompletionItemKind) of the completion. - */ - constructor(label: string, kind?: CompletionItemKind); - } - - /** - * Represents a collection of [completion items](#CompletionItem) to be presented - * in the editor. - */ - export class CompletionList { - - /** - * This list is not complete. Further typing should result in recomputing - * this list. - */ - isIncomplete?: boolean; - - /** - * The completion items. - */ - items: CompletionItem[]; - - /** - * Creates a new completion list. - * - * @param items The completion items. - * @param isIncomplete The list is not complete. - */ - constructor(items?: CompletionItem[], isIncomplete?: boolean); - } - - /** - * How a [completion provider](#CompletionItemProvider) was triggered - */ - export enum CompletionTriggerKind { - /** - * Completion was triggered normally. - */ - Invoke = 0, - /** - * Completion was triggered by a trigger character. - */ - TriggerCharacter = 1, - /** - * Completion was re-triggered as current completion list is incomplete - */ - TriggerForIncompleteCompletions = 2 - } - - /** - * Contains additional information about the context in which - * [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered. - */ - export interface CompletionContext { - /** - * How the completion was triggered. - */ - readonly triggerKind: CompletionTriggerKind; - - /** - * Character that triggered the completion item provider. - * - * `undefined` if provider was not triggered by a character. - * - * The trigger character is already in the document when the completion provider is triggered. - */ - readonly triggerCharacter?: string; - } - - /** - * The completion item provider interface defines the contract between extensions and - * [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense). - * - * Providers can delay the computation of the [`detail`](#CompletionItem.detail) - * and [`documentation`](#CompletionItem.documentation) properties by implementing the - * [`resolveCompletionItem`](#CompletionItemProvider.resolveCompletionItem)-function. However, properties that - * are needed for the initial sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must - * not be changed during resolve. - * - * Providers are asked for completions either explicitly by a user gesture or -depending on the configuration- - * implicitly when typing words or trigger characters. - */ - export interface CompletionItemProvider { - - /** - * Provide completion items for the given position and document. - * - * @param document The document in which the command was invoked. - * @param position The position at which the command was invoked. - * @param token A cancellation token. - * @param context How the completion was triggered. - * - * @return An array of completions, a [completion list](#CompletionList), or a thenable that resolves to either. - * The lack of a result can be signaled by returning `undefined`, `null`, or an empty array. - */ - provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken, context: CompletionContext): ProviderResult; - - /** - * Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation) - * or [details](#CompletionItem.detail). - * - * The editor will only resolve a completion item once. - * - * *Note* that accepting a completion item will not wait for it to be resolved. Because of that [`insertText`](#CompletionItem.insertText), - * [`additionalTextEdits`](#CompletionItem.additionalTextEdits), and [`command`](#CompletionItem.command) should not - * be changed when resolving an item. - * - * @param item A completion item currently active in the UI. - * @param token A cancellation token. - * @return The resolved completion item or a thenable that resolves to of such. It is OK to return the given - * `item`. When no result is returned, the given `item` will be used. - */ - resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult; - } - - - /** - * A document link is a range in a text document that links to an internal or external resource, like another - * text document or a web site. - */ - export class DocumentLink { - - /** - * The range this link applies to. - */ - range: Range; - - /** - * The uri this link points to. - */ - target?: Uri; - - /** - * The tooltip text when you hover over this link. - * - * If a tooltip is provided, is will be displayed in a string that includes instructions on how to - * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, - * user settings, and localization. - */ - tooltip?: string; - - /** - * Creates a new document link. - * - * @param range The range the document link applies to. Must not be empty. - * @param target The uri the document link points to. - */ - constructor(range: Range, target?: Uri); - } - - /** - * The document link provider defines the contract between extensions and feature of showing - * links in the editor. - */ - export interface DocumentLinkProvider { - - /** - * Provide links for the given document. Note that the editor ships with a default provider that detects - * `http(s)` and `file` links. - * - * @param document The document in which the command was invoked. - * @param token A cancellation token. - * @return An array of [document links](#DocumentLink) or a thenable that resolves to such. The lack of a result - * can be signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentLinks(document: TextDocument, token: CancellationToken): ProviderResult; - - /** - * Given a link fill in its [target](#DocumentLink.target). This method is called when an incomplete - * link is selected in the UI. Providers can implement this method and return incomplete links - * (without target) from the [`provideDocumentLinks`](#DocumentLinkProvider.provideDocumentLinks) method which - * often helps to improve performance. - * - * @param link The link that is to be resolved. - * @param token A cancellation token. - */ - resolveDocumentLink?(link: DocumentLink, token: CancellationToken): ProviderResult; - } - - /** - * Represents a color in RGBA space. - */ - export class Color { - - /** - * The red component of this color in the range [0-1]. - */ - readonly red: number; - - /** - * The green component of this color in the range [0-1]. - */ - readonly green: number; - - /** - * The blue component of this color in the range [0-1]. - */ - readonly blue: number; - - /** - * The alpha component of this color in the range [0-1]. - */ - readonly alpha: number; - - /** - * Creates a new color instance. - * - * @param red The red component. - * @param green The green component. - * @param blue The blue component. - * @param alpha The alpha component. - */ - constructor(red: number, green: number, blue: number, alpha: number); - } - - /** - * Represents a color range from a document. - */ - export class ColorInformation { - - /** - * The range in the document where this color appears. - */ - range: Range; - - /** - * The actual color value for this color range. - */ - color: Color; - - /** - * Creates a new color range. - * - * @param range The range the color appears in. Must not be empty. - * @param color The value of the color. - * @param format The format in which this color is currently formatted. - */ - constructor(range: Range, color: Color); - } - - /** - * A color presentation object describes how a [`color`](#Color) should be represented as text and what - * edits are required to refer to it from source code. - * - * For some languages one color can have multiple presentations, e.g. css can represent the color red with - * the constant `Red`, the hex-value `#ff0000`, or in rgba and hsla forms. In csharp other representations - * apply, e.g. `System.Drawing.Color.Red`. - */ - export class ColorPresentation { - - /** - * The label of this color presentation. It will be shown on the color - * picker header. By default this is also the text that is inserted when selecting - * this color presentation. - */ - label: string; - - /** - * An [edit](#TextEdit) which is applied to a document when selecting - * this presentation for the color. When `falsy` the [label](#ColorPresentation.label) - * is used. - */ - textEdit?: TextEdit; - - /** - * An optional array of additional [text edits](#TextEdit) that are applied when - * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves. - */ - additionalTextEdits?: TextEdit[]; - - /** - * Creates a new color presentation. - * - * @param label The label of this color presentation. - */ - constructor(label: string); - } - - /** - * The document color provider defines the contract between extensions and feature of - * picking and modifying colors in the editor. - */ - export interface DocumentColorProvider { - - /** - * Provide colors for the given document. - * - * @param document The document in which the command was invoked. - * @param token A cancellation token. - * @return An array of [color information](#ColorInformation) or a thenable that resolves to such. The lack of a result - * can be signaled by returning `undefined`, `null`, or an empty array. - */ - provideDocumentColors(document: TextDocument, token: CancellationToken): ProviderResult; - - /** - * Provide [representations](#ColorPresentation) for a color. - * - * @param color The color to show and insert. - * @param context A context object with additional information - * @param token A cancellation token. - * @return An array of color presentations or a thenable that resolves to such. The lack of a result - * can be signaled by returning `undefined`, `null`, or an empty array. - */ - provideColorPresentations(color: Color, context: { document: TextDocument, range: Range }, token: CancellationToken): ProviderResult; - } - - /** - * A line based folding range. To be valid, start and end line must be bigger than zero and smaller than the number of lines in the document. - * Invalid ranges will be ignored. - */ - export class FoldingRange { - - /** - * The zero-based start line of the range to fold. The folded area starts after the line's last character. - * To be valid, the end must be zero or larger and smaller than the number of lines in the document. - */ - start: number; - - /** - * The zero-based end line of the range to fold. The folded area ends with the line's last character. - * To be valid, the end must be zero or larger and smaller than the number of lines in the document. - */ - end: number; - - /** - * Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or - * [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands - * like 'Fold all comments'. See - * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of all kinds. - * If not set, the range is originated from a syntax element. - */ - kind?: FoldingRangeKind; - - /** - * Creates a new folding range. - * - * @param start The start line of the folded range. - * @param end The end line of the folded range. - * @param kind The kind of the folding range. - */ - constructor(start: number, end: number, kind?: FoldingRangeKind); - } - - /** - * An enumeration of specific folding range kinds. The kind is an optional field of a [FoldingRange](#FoldingRange) - * and is used to distinguish specific folding ranges such as ranges originated from comments. The kind is used by commands like - * `Fold all comments` or `Fold all regions`. - * If the kind is not set on the range, the range originated from a syntax element other than comments, imports or region markers. - */ - export enum FoldingRangeKind { - /** - * Kind for folding range representing a comment. - */ - Comment = 1, - /** - * Kind for folding range representing a import. - */ - Imports = 2, - /** - * Kind for folding range representing regions originating from folding markers like `#region` and `#endregion`. - */ - Region = 3 - } - - /** - * Folding context (for future use) - */ - export interface FoldingContext { - } - - /** - * The folding range provider interface defines the contract between extensions and - * [Folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) in the editor. - */ - export interface FoldingRangeProvider { - /** - * Returns a list of folding ranges or null and undefined if the provider - * does not want to participate or was cancelled. - * @param document The document in which the command was invoked. - * @param context Additional context information (for future use) - * @param token A cancellation token. - */ - provideFoldingRanges(document: TextDocument, context: FoldingContext, token: CancellationToken): ProviderResult; - } - - /** - * A selection range represents a part of a selection hierarchy. A selection range - * may have a parent selection range that contains it. - */ - export class SelectionRange { - - /** - * The [range](#Range) of this selection range. - */ - range: Range; - - /** - * The parent selection range containing this range. - */ - parent?: SelectionRange; - - /** - * Creates a new selection range. - * - * @param range The range of the selection range. - * @param parent The parent of the selection range. - */ - constructor(range: Range, parent?: SelectionRange); - } - - export interface SelectionRangeProvider { - /** - * Provide selection ranges for the given positions. - * - * Selection ranges should be computed individually and independent for each position. The editor will merge - * and deduplicate ranges but providers must return hierarchies of selection ranges so that a range - * is [contained](#Range.contains) by its parent. - * - * @param document The document in which the command was invoked. - * @param positions The positions at which the command was invoked. - * @param token A cancellation token. - * @return Selection ranges or a thenable that resolves to such. The lack of a result can be - * signaled by returning `undefined` or `null`. - */ - provideSelectionRanges(document: TextDocument, positions: Position[], token: CancellationToken): ProviderResult; - } - - /** - * A tuple of two characters, like a pair of - * opening and closing brackets. - */ - export type CharacterPair = [string, string]; - - /** - * Describes how comments for a language work. - */ - export interface CommentRule { - - /** - * The line comment token, like `// this is a comment` - */ - lineComment?: string; - - /** - * The block comment character pair, like `/* block comment */` - */ - blockComment?: CharacterPair; - } - - /** - * Describes indentation rules for a language. - */ - export interface IndentationRule { - /** - * If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches). - */ - decreaseIndentPattern: RegExp; - /** - * If a line matches this pattern, then all the lines after it should be indented once (until another rule matches). - */ - increaseIndentPattern: RegExp; - /** - * If a line matches this pattern, then **only the next line** after it should be indented once. - */ - indentNextLinePattern?: RegExp; - /** - * If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules. - */ - unIndentedLinePattern?: RegExp; - } - - /** - * Describes what to do with the indentation when pressing Enter. - */ - export enum IndentAction { - /** - * Insert new line and copy the previous line's indentation. - */ - None = 0, - /** - * Insert new line and indent once (relative to the previous line's indentation). - */ - Indent = 1, - /** - * Insert two new lines: - * - the first one indented which will hold the cursor - * - the second one at the same indentation level - */ - IndentOutdent = 2, - /** - * Insert new line and outdent once (relative to the previous line's indentation). - */ - Outdent = 3 - } - - /** - * Describes what to do when pressing Enter. - */ - export interface EnterAction { - /** - * Describe what to do with the indentation. - */ - indentAction: IndentAction; - /** - * Describes text to be appended after the new line and after the indentation. - */ - appendText?: string; - /** - * Describes the number of characters to remove from the new line's indentation. - */ - removeText?: number; - } - - /** - * Describes a rule to be evaluated when pressing Enter. - */ - export interface OnEnterRule { - /** - * This rule will only execute if the text before the cursor matches this regular expression. - */ - beforeText: RegExp; - /** - * This rule will only execute if the text after the cursor matches this regular expression. - */ - afterText?: RegExp; - /** - * The action to execute. - */ - action: EnterAction; - } - - /** - * The language configuration interfaces defines the contract between extensions - * and various editor features, like automatic bracket insertion, automatic indentation etc. - */ - export interface LanguageConfiguration { - /** - * The language's comment settings. - */ - comments?: CommentRule; - /** - * The language's brackets. - * This configuration implicitly affects pressing Enter around these brackets. - */ - brackets?: CharacterPair[]; - /** - * The language's word definition. - * If the language supports Unicode identifiers (e.g. JavaScript), it is preferable - * to provide a word definition that uses exclusion of known separators. - * e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number): - * /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g - */ - wordPattern?: RegExp; - /** - * The language's indentation settings. - */ - indentationRules?: IndentationRule; - /** - * The language's rules to be evaluated when pressing Enter. - */ - onEnterRules?: OnEnterRule[]; - - /** - * **Deprecated** Do not use. - * - * @deprecated Will be replaced by a better API soon. - */ - __electricCharacterSupport?: { - /** - * This property is deprecated and will be **ignored** from - * the editor. - * @deprecated - */ - brackets?: any; - /** - * This property is deprecated and not fully supported anymore by - * the editor (scope and lineStart are ignored). - * Use the autoClosingPairs property in the language configuration file instead. - * @deprecated - */ - docComment?: { - scope: string; - open: string; - lineStart: string; - close?: string; - }; - }; - - /** - * **Deprecated** Do not use. - * - * @deprecated * Use the autoClosingPairs property in the language configuration file instead. - */ - __characterPairSupport?: { - autoClosingPairs: { - open: string; - close: string; - notIn?: string[]; - }[]; - }; - } - - /** - * The configuration target - */ - export enum ConfigurationTarget { - /** - * Global configuration - */ - Global = 1, - - /** - * Workspace configuration - */ - Workspace = 2, - - /** - * Workspace folder configuration - */ - WorkspaceFolder = 3 - } - - /** - * Represents the configuration. It is a merged view of - * - * - Default configuration - * - Global configuration - * - Workspace configuration (if available) - * - Workspace folder configuration of the requested resource (if available) - * - * *Global configuration* comes from User Settings and shadows Defaults. - * - * *Workspace configuration* comes from Workspace Settings and shadows Global configuration. - * - * *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders). - * - * *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be - * part of the section identifier. The following snippets shows how to retrieve all configurations - * from `launch.json`: - * - * ```ts - * // launch.json configuration - * const config = workspace.getConfiguration('launch', vscode.window.activeTextEditor.document.uri); - * - * // retrieve values - * const values = config.get('configurations'); - * ``` - * - * Refer to [Settings](https://code.visualstudio.com/docs/getstarted/settings) for more information. - */ - export interface WorkspaceConfiguration { - - /** - * Return a value from this configuration. - * - * @param section Configuration name, supports _dotted_ names. - * @return The value `section` denotes or `undefined`. - */ - get(section: string): T | undefined; - - /** - * Return a value from this configuration. - * - * @param section Configuration name, supports _dotted_ names. - * @param defaultValue A value should be returned when no value could be found, is `undefined`. - * @return The value `section` denotes or the default. - */ - get(section: string, defaultValue: T): T; - - /** - * Check if this configuration has a certain value. - * - * @param section Configuration name, supports _dotted_ names. - * @return `true` if the section doesn't resolve to `undefined`. - */ - has(section: string): boolean; - - /** - * Retrieve all information about a configuration setting. A configuration value - * often consists of a *default* value, a global or installation-wide value, - * a workspace-specific value and a folder-specific value. - * - * The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) - * is computed like this: `defaultValue` overwritten by `globalValue`, - * `globalValue` overwritten by `workspaceValue`. `workspaceValue` overwritten by `workspaceFolderValue`. - * Refer to [Settings Inheritance](https://code.visualstudio.com/docs/getstarted/settings) - * for more information. - * - * *Note:* The configuration name must denote a leaf in the configuration tree - * (`editor.fontSize` vs `editor`) otherwise no result is returned. - * - * @param section Configuration name, supports _dotted_ names. - * @return Information about a configuration setting or `undefined`. - */ - inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, workspaceFolderValue?: T } | undefined; - - /** - * Update a configuration value. The updated configuration values are persisted. - * - * A value can be changed in - * - * - [Global configuration](#ConfigurationTarget.Global): Changes the value for all instances of the editor. - * - [Workspace configuration](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available. - * - [Workspace folder configuration](#ConfigurationTarget.WorkspaceFolder): Changes the value for the - * [Workspace folder](#workspace.workspaceFolders) to which the current [configuration](#WorkspaceConfiguration) is scoped to. - * - * *Note 1:* Setting a global value in the presence of a more specific workspace value - * has no observable effect in that workspace, but in others. Setting a workspace value - * in the presence of a more specific folder value has no observable effect for the resources - * under respective [folder](#workspace.workspaceFolders), but in others. Refer to - * [Settings Inheritance](https://code.visualstudio.com/docs/getstarted/settings) for more information. - * - * *Note 2:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)` - * - * Will throw error when - * - Writing a configuration which is not registered. - * - Writing a configuration to workspace or folder target when no workspace is opened - * - Writing a configuration to folder target when there is no folder settings - * - Writing to folder target without passing a resource when getting the configuration (`workspace.getConfiguration(section, resource)`) - * - Writing a window configuration to folder target - * - * @param section Configuration name, supports _dotted_ names. - * @param value The new value. - * @param configurationTarget The [configuration target](#ConfigurationTarget) or a boolean value. - * - If `true` configuration target is `ConfigurationTarget.Global`. - * - If `false` configuration target is `ConfigurationTarget.Workspace`. - * - If `undefined` or `null` configuration target is - * `ConfigurationTarget.WorkspaceFolder` when configuration is resource specific - * `ConfigurationTarget.Workspace` otherwise. - */ - update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean): Thenable; - - /** - * Readable dictionary that backs this configuration. - */ - readonly [key: string]: any; - } - - /** - * Represents a location inside a resource, such as a line - * inside a text file. - */ - export class Location { - - /** - * The resource identifier of this location. - */ - uri: Uri; - - /** - * The document range of this location. - */ - range: Range; - - /** - * Creates a new location object. - * - * @param uri The resource identifier. - * @param rangeOrPosition The range or position. Positions will be converted to an empty range. - */ - constructor(uri: Uri, rangeOrPosition: Range | Position); - } - - /** - * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location), - * including an origin range. - */ - export interface LocationLink { - /** - * Span of the origin of this link. - * - * Used as the underlined span for mouse definition hover. Defaults to the word range at - * the definition position. - */ - originSelectionRange?: Range; - - /** - * The target resource identifier of this link. - */ - targetUri: Uri; - - /** - * The full target range of this link. - */ - targetRange: Range; - - /** - * The span of this link. - */ - targetSelectionRange?: Range; - } - - /** - * The event that is fired when diagnostics change. - */ - export interface DiagnosticChangeEvent { - - /** - * An array of resources for which diagnostics have changed. - */ - readonly uris: ReadonlyArray; - } - - /** - * Represents the severity of diagnostics. - */ - export enum DiagnosticSeverity { - - /** - * Something not allowed by the rules of a language or other means. - */ - Error = 0, - - /** - * Something suspicious but allowed. - */ - Warning = 1, - - /** - * Something to inform about but not a problem. - */ - Information = 2, - - /** - * Something to hint to a better way of doing it, like proposing - * a refactoring. - */ - Hint = 3 - } - - /** - * Represents a related message and source code location for a diagnostic. This should be - * used to point to code locations that cause or related to a diagnostics, e.g. when duplicating - * a symbol in a scope. - */ - export class DiagnosticRelatedInformation { - - /** - * The location of this related diagnostic information. - */ - location: Location; - - /** - * The message of this related diagnostic information. - */ - message: string; - - /** - * Creates a new related diagnostic information object. - * - * @param location The location. - * @param message The message. - */ - constructor(location: Location, message: string); - } - - /** - * Additional metadata about the type of a diagnostic. - */ - export enum DiagnosticTag { - /** - * Unused or unnecessary code. - * - * Diagnostics with this tag are rendered faded out. The amount of fading - * is controlled by the `"editorUnnecessaryCode.opacity"` theme color. For - * example, `"editorUnnecessaryCode.opacity": "#000000c0"` will render the - * code with 75% opacity. For high contrast themes, use the - * `"editorUnnecessaryCode.border"` theme color to underline unnecessary code - * instead of fading it out. - */ - Unnecessary = 1, - - /** - * Deprecated or obsolete code. - * - * Diagnostics with this tag are rendered with a strike through. - */ - Deprecated = 2, - } - - /** - * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects - * are only valid in the scope of a file. - */ - export class Diagnostic { - - /** - * The range to which this diagnostic applies. - */ - range: Range; - - /** - * The human-readable message. - */ - message: string; - - /** - * The severity, default is [error](#DiagnosticSeverity.Error). - */ - severity: DiagnosticSeverity; - - /** - * A human-readable string describing the source of this - * diagnostic, e.g. 'typescript' or 'super lint'. - */ - source?: string; - - /** - * A code or identifier for this diagnostic. - * Should be used for later processing, e.g. when providing [code actions](#CodeActionContext). - */ - code?: string | number; - - /** - * An array of related diagnostic information, e.g. when symbol-names within - * a scope collide all definitions can be marked via this property. - */ - relatedInformation?: DiagnosticRelatedInformation[]; - - /** - * Additional metadata about the diagnostic. - */ - tags?: DiagnosticTag[]; - - /** - * Creates a new diagnostic object. - * - * @param range The range to which this diagnostic applies. - * @param message The human-readable message. - * @param severity The severity, default is [error](#DiagnosticSeverity.Error). - */ - constructor(range: Range, message: string, severity?: DiagnosticSeverity); - } - - /** - * A diagnostics collection is a container that manages a set of - * [diagnostics](#Diagnostic). Diagnostics are always scopes to a - * diagnostics collection and a resource. - * - * To get an instance of a `DiagnosticCollection` use - * [createDiagnosticCollection](#languages.createDiagnosticCollection). - */ - export interface DiagnosticCollection { - - /** - * The name of this diagnostic collection, for instance `typescript`. Every diagnostic - * from this collection will be associated with this name. Also, the task framework uses this - * name when defining [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher). - */ - readonly name: string; - - /** - * Assign diagnostics for given resource. Will replace - * existing diagnostics for that resource. - * - * @param uri A resource identifier. - * @param diagnostics Array of diagnostics or `undefined` - */ - set(uri: Uri, diagnostics: ReadonlyArray | undefined): void; - - /** - * Replace all entries in this collection. - * - * Diagnostics of multiple tuples of the same uri will be merged, e.g - * `[[file1, [d1]], [file1, [d2]]]` is equivalent to `[[file1, [d1, d2]]]`. - * If a diagnostics item is `undefined` as in `[file1, undefined]` - * all previous but not subsequent diagnostics are removed. - * - * @param entries An array of tuples, like `[[file1, [d1, d2]], [file2, [d3, d4, d5]]]`, or `undefined`. - */ - set(entries: ReadonlyArray<[Uri, ReadonlyArray | undefined]>): void; - - /** - * Remove all diagnostics from this collection that belong - * to the provided `uri`. The same as `#set(uri, undefined)`. - * - * @param uri A resource identifier. - */ - delete(uri: Uri): void; - - /** - * Remove all diagnostics from this collection. The same - * as calling `#set(undefined)`; - */ - clear(): void; - - /** - * Iterate over each entry in this collection. - * - * @param callback Function to execute for each entry. - * @param thisArg The `this` context used when invoking the handler function. - */ - forEach(callback: (uri: Uri, diagnostics: ReadonlyArray, collection: DiagnosticCollection) => any, thisArg?: any): void; - - /** - * Get the diagnostics for a given resource. *Note* that you cannot - * modify the diagnostics-array returned from this call. - * - * @param uri A resource identifier. - * @returns An immutable array of [diagnostics](#Diagnostic) or `undefined`. - */ - get(uri: Uri): ReadonlyArray | undefined; - - /** - * Check if this collection contains diagnostics for a - * given resource. - * - * @param uri A resource identifier. - * @returns `true` if this collection has diagnostic for the given resource. - */ - has(uri: Uri): boolean; - - /** - * Dispose and free associated resources. Calls - * [clear](#DiagnosticCollection.clear). - */ - dispose(): void; - } - - /** - * Denotes a location of an editor in the window. Editors can be arranged in a grid - * and each column represents one editor location in that grid by counting the editors - * in order of their appearance. - */ - export enum ViewColumn { - /** - * A *symbolic* editor column representing the currently active column. This value - * can be used when opening editors, but the *resolved* [viewColumn](#TextEditor.viewColumn)-value - * of editors will always be `One`, `Two`, `Three`,... or `undefined` but never `Active`. - */ - Active = -1, - /** - * A *symbolic* editor column representing the column to the side of the active one. This value - * can be used when opening editors, but the *resolved* [viewColumn](#TextEditor.viewColumn)-value - * of editors will always be `One`, `Two`, `Three`,... or `undefined` but never `Beside`. - */ - Beside = -2, - /** - * The first editor column. - */ - One = 1, - /** - * The second editor column. - */ - Two = 2, - /** - * The third editor column. - */ - Three = 3, - /** - * The fourth editor column. - */ - Four = 4, - /** - * The fifth editor column. - */ - Five = 5, - /** - * The sixth editor column. - */ - Six = 6, - /** - * The seventh editor column. - */ - Seven = 7, - /** - * The eighth editor column. - */ - Eight = 8, - /** - * The ninth editor column. - */ - Nine = 9 - } - - /** - * An output channel is a container for readonly textual information. - * - * To get an instance of an `OutputChannel` use - * [createOutputChannel](#window.createOutputChannel). - */ - export interface OutputChannel { - - /** - * The human-readable name of this output channel. - */ - readonly name: string; - - /** - * Append the given value to the channel. - * - * @param value A string, falsy values will not be printed. - */ - append(value: string): void; - - /** - * Append the given value and a line feed character - * to the channel. - * - * @param value A string, falsy values will be printed. - */ - appendLine(value: string): void; - - /** - * Removes all output from the channel. - */ - clear(): void; - - /** - * Reveal this channel in the UI. - * - * @param preserveFocus When `true` the channel will not take focus. - */ - show(preserveFocus?: boolean): void; - - /** - * ~~Reveal this channel in the UI.~~ - * - * @deprecated Use the overload with just one parameter (`show(preserveFocus?: boolean): void`). - * - * @param column This argument is **deprecated** and will be ignored. - * @param preserveFocus When `true` the channel will not take focus. - */ - show(column?: ViewColumn, preserveFocus?: boolean): void; - - /** - * Hide this channel from the UI. - */ - hide(): void; - - /** - * Dispose and free associated resources. - */ - dispose(): void; - } - - /** - * Represents the alignment of status bar items. - */ - export enum StatusBarAlignment { - - /** - * Aligned to the left side. - */ - Left = 1, - - /** - * Aligned to the right side. - */ - Right = 2 - } - - /** - * A status bar item is a status bar contribution that can - * show text and icons and run a command on click. - */ - export interface StatusBarItem { - - /** - * The alignment of this item. - */ - readonly alignment: StatusBarAlignment; - - /** - * The priority of this item. Higher value means the item should - * be shown more to the left. - */ - readonly priority?: number; - - /** - * The text to show for the entry. You can embed icons in the text by leveraging the syntax: - * - * `My text $(icon-name) contains icons like $(icon-name) this one.` - * - * Where the icon-name is taken from the [octicon](https://octicons.github.com) icon set, e.g. - * `light-bulb`, `thumbsup`, `zap` etc. - */ - text: string; - - /** - * The tooltip text when you hover over this entry. - */ - tooltip: string | undefined; - - /** - * The foreground color for this entry. - */ - color: string | ThemeColor | undefined; - - /** - * The identifier of a command to run on click. The command must be - * [known](#commands.getCommands). - */ - command: string | undefined; - - /** - * Shows the entry in the status bar. - */ - show(): void; - - /** - * Hide the entry in the status bar. - */ - hide(): void; - - /** - * Dispose and free associated resources. Call - * [hide](#StatusBarItem.hide). - */ - dispose(): void; - } - - /** - * Defines a generalized way of reporting progress updates. - */ - export interface Progress { - - /** - * Report a progress update. - * @param value A progress item, like a message and/or an - * report on how much work finished - */ - report(value: T): void; - } - - /** - * An individual terminal instance within the integrated terminal. - */ - export interface Terminal { - - /** - * The name of the terminal. - */ - readonly name: string; - - /** - * The process ID of the shell process. - */ - readonly processId: Thenable; - - /** - * Send text to the terminal. The text is written to the stdin of the underlying pty process - * (shell) of the terminal. - * - * @param text The text to send. - * @param addNewLine Whether to add a new line to the text being sent, this is normally - * required to run a command in the terminal. The character(s) added are \n or \r\n - * depending on the platform. This defaults to `true`. - */ - sendText(text: string, addNewLine?: boolean): void; - - /** - * Show the terminal panel and reveal this terminal in the UI. - * - * @param preserveFocus When `true` the terminal will not take focus. - */ - show(preserveFocus?: boolean): void; - - /** - * Hide the terminal panel if this terminal is currently showing. - */ - hide(): void; - - /** - * Dispose and free associated resources. - */ - dispose(): void; - } - - /** - * In a remote window the extension kind describes if an extension - * runs where the UI (window) runs or if an extension runs remotely. - */ - export enum ExtensionKind { - - /** - * Extension runs where the UI runs. - */ - UI = 1, - - /** - * Extension runs where the remote extension host runs. - */ - Workspace = 2 - } - - /** - * Represents an extension. - * - * To get an instance of an `Extension` use [getExtension](#extensions.getExtension). - */ - export interface Extension { - - /** - * The canonical extension identifier in the form of: `publisher.name`. - */ - readonly id: string; - - /** - * The absolute file path of the directory containing this extension. - */ - readonly extensionPath: string; - - /** - * `true` if the extension has been activated. - */ - readonly isActive: boolean; - - /** - * The parsed contents of the extension's package.json. - */ - readonly packageJSON: any; - - /** - * The extension kind describes if an extension runs where the UI runs - * or if an extension runs where the remote extension host runs. The extension kind - * if defined in the `package.json` file of extensions but can also be refined - * via the the `remote.extensionKind`-setting. When no remote extension host exists, - * the value is [`ExtensionKind.UI`](#ExtensionKind.UI). - */ - extensionKind: ExtensionKind; - - /** - * The public API exported by this extension. It is an invalid action - * to access this field before this extension has been activated. - */ - readonly exports: T; - - /** - * Activates this extension and returns its public API. - * - * @return A promise that will resolve when this extension has been activated. - */ - activate(): Thenable; - } - - /** - * An extension context is a collection of utilities private to an - * extension. - * - * An instance of an `ExtensionContext` is provided as the first - * parameter to the `activate`-call of an extension. - */ - export interface ExtensionContext { - - /** - * An array to which disposables can be added. When this - * extension is deactivated the disposables will be disposed. - */ - readonly subscriptions: { dispose(): any }[]; - - /** - * A memento object that stores state in the context - * of the currently opened [workspace](#workspace.workspaceFolders). - */ - readonly workspaceState: Memento; - - /** - * A memento object that stores state independent - * of the current opened [workspace](#workspace.workspaceFolders). - */ - readonly globalState: Memento; - - /** - * The absolute file path of the directory containing the extension. - */ - readonly extensionPath: string; - - /** - * Get the absolute path of a resource contained in the extension. - * - * @param relativePath A relative path to a resource contained in the extension. - * @return The absolute path of the resource. - */ - asAbsolutePath(relativePath: string): string; - - /** - * An absolute file path of a workspace specific directory in which the extension - * can store private state. The directory might not exist on disk and creation is - * up to the extension. However, the parent directory is guaranteed to be existent. - * - * Use [`workspaceState`](#ExtensionContext.workspaceState) or - * [`globalState`](#ExtensionContext.globalState) to store key value data. - */ - readonly storagePath: string | undefined; - - /** - * An absolute file path in which the extension can store global state. - * The directory might not exist on disk and creation is - * up to the extension. However, the parent directory is guaranteed to be existent. - * - * Use [`globalState`](#ExtensionContext.globalState) to store key value data. - */ - readonly globalStoragePath: string; - - /** - * An absolute file path of a directory in which the extension can create log files. - * The directory might not exist on disk and creation is up to the extension. However, - * the parent directory is guaranteed to be existent. - */ - readonly logPath: string; - } - - /** - * A memento represents a storage utility. It can store and retrieve - * values. - */ - export interface Memento { - - /** - * Return a value. - * - * @param key A string. - * @return The stored value or `undefined`. - */ - get(key: string): T | undefined; - - /** - * Return a value. - * - * @param key A string. - * @param defaultValue A value that should be returned when there is no - * value (`undefined`) with the given key. - * @return The stored value or the defaultValue. - */ - get(key: string, defaultValue: T): T; - - /** - * Store a value. The value must be JSON-stringifyable. - * - * @param key A string. - * @param value A value. MUST not contain cyclic references. - */ - update(key: string, value: any): Thenable; - } - - /** - * Controls the behaviour of the terminal's visibility. - */ - export enum TaskRevealKind { - /** - * Always brings the terminal to front if the task is executed. - */ - Always = 1, - - /** - * Only brings the terminal to front if a problem is detected executing the task - * (e.g. the task couldn't be started because). - */ - Silent = 2, - - /** - * The terminal never comes to front when the task is executed. - */ - Never = 3 - } - - /** - * Controls how the task channel is used between tasks - */ - export enum TaskPanelKind { - - /** - * Shares a panel with other tasks. This is the default. - */ - Shared = 1, - - /** - * Uses a dedicated panel for this tasks. The panel is not - * shared with other tasks. - */ - Dedicated = 2, - - /** - * Creates a new panel whenever this task is executed. - */ - New = 3 - } - - /** - * Controls how the task is presented in the UI. - */ - export interface TaskPresentationOptions { - /** - * Controls whether the task output is reveal in the user interface. - * Defaults to `RevealKind.Always`. - */ - reveal?: TaskRevealKind; - - /** - * Controls whether the command associated with the task is echoed - * in the user interface. - */ - echo?: boolean; - - /** - * Controls whether the panel showing the task output is taking focus. - */ - focus?: boolean; - - /** - * Controls if the task panel is used for this task only (dedicated), - * shared between tasks (shared) or if a new panel is created on - * every task execution (new). Defaults to `TaskInstanceKind.Shared` - */ - panel?: TaskPanelKind; - - /** - * Controls whether to show the "Terminal will be reused by tasks, press any key to close it" message. - */ - showReuseMessage?: boolean; - - /** - * Controls whether the terminal is cleared before executing the task. - */ - clear?: boolean; - } - - /** - * A grouping for tasks. The editor by default supports the - * 'Clean', 'Build', 'RebuildAll' and 'Test' group. - */ - export class TaskGroup { - - /** - * The clean task group; - */ - static Clean: TaskGroup; - - /** - * The build task group; - */ - static Build: TaskGroup; - - /** - * The rebuild all task group; - */ - static Rebuild: TaskGroup; - - /** - * The test all task group; - */ - static Test: TaskGroup; - - private constructor(id: string, label: string); - } - - - /** - * A structure that defines a task kind in the system. - * The value must be JSON-stringifyable. - */ - export interface TaskDefinition { - /** - * The task definition describing the task provided by an extension. - * Usually a task provider defines more properties to identify - * a task. They need to be defined in the package.json of the - * extension under the 'taskDefinitions' extension point. The npm - * task definition for example looks like this - * ```typescript - * interface NpmTaskDefinition extends TaskDefinition { - * script: string; - * } - * ``` - * - * Note that type identifier starting with a '$' are reserved for internal - * usages and shouldn't be used by extensions. - */ - readonly type: string; - - /** - * Additional attributes of a concrete task definition. - */ - [name: string]: any; - } - - /** - * Options for a process execution - */ - export interface ProcessExecutionOptions { - /** - * The current working directory of the executed program or shell. - * If omitted the tools current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed program or shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } - - /** - * The execution of a task happens as an external process - * without shell interaction. - */ - export class ProcessExecution { - - /** - * Creates a process execution. - * - * @param process The process to start. - * @param options Optional options for the started process. - */ - constructor(process: string, options?: ProcessExecutionOptions); - - /** - * Creates a process execution. - * - * @param process The process to start. - * @param args Arguments to be passed to the process. - * @param options Optional options for the started process. - */ - constructor(process: string, args: string[], options?: ProcessExecutionOptions); - - /** - * The process to be executed. - */ - process: string; - - /** - * The arguments passed to the process. Defaults to an empty array. - */ - args: string[]; - - /** - * The process options used when the process is executed. - * Defaults to undefined. - */ - options?: ProcessExecutionOptions; - } - - /** - * The shell quoting options. - */ - export interface ShellQuotingOptions { - - /** - * The character used to do character escaping. If a string is provided only spaces - * are escaped. If a `{ escapeChar, charsToEscape }` literal is provide all characters - * in `charsToEscape` are escaped using the `escapeChar`. - */ - escape?: string | { - /** - * The escape character. - */ - escapeChar: string; - /** - * The characters to escape. - */ - charsToEscape: string; - }; - - /** - * The character used for strong quoting. The string's length must be 1. - */ - strong?: string; - - /** - * The character used for weak quoting. The string's length must be 1. - */ - weak?: string; - } - - /** - * Options for a shell execution - */ - export interface ShellExecutionOptions { - /** - * The shell executable. - */ - executable?: string; - - /** - * The arguments to be passed to the shell executable used to run the task. Most shells - * require special arguments to execute a command. For example `bash` requires the `-c` - * argument to execute a command, `PowerShell` requires `-Command` and `cmd` requires both - * `/d` and `/c`. - */ - shellArgs?: string[]; - - /** - * The shell quotes supported by this shell. - */ - shellQuoting?: ShellQuotingOptions; - - /** - * The current working directory of the executed shell. - * If omitted the tools current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } - - /** - * Defines how an argument should be quoted if it contains - * spaces or unsupported characters. - */ - export enum ShellQuoting { - - /** - * Character escaping should be used. This for example - * uses \ on bash and ` on PowerShell. - */ - Escape = 1, - - /** - * Strong string quoting should be used. This for example - * uses " for Windows cmd and ' for bash and PowerShell. - * Strong quoting treats arguments as literal strings. - * Under PowerShell echo 'The value is $(2 * 3)' will - * print `The value is $(2 * 3)` - */ - Strong = 2, - - /** - * Weak string quoting should be used. This for example - * uses " for Windows cmd, bash and PowerShell. Weak quoting - * still performs some kind of evaluation inside the quoted - * string. Under PowerShell echo "The value is $(2 * 3)" - * will print `The value is 6` - */ - Weak = 3 - } - - /** - * A string that will be quoted depending on the used shell. - */ - export interface ShellQuotedString { - /** - * The actual string value. - */ - value: string; - - /** - * The quoting style to use. - */ - quoting: ShellQuoting; - } - - export class ShellExecution { - /** - * Creates a shell execution with a full command line. - * - * @param commandLine The command line to execute. - * @param options Optional options for the started the shell. - */ - constructor(commandLine: string, options?: ShellExecutionOptions); - - /** - * Creates a shell execution with a command and arguments. For the real execution VS Code will - * construct a command line from the command and the arguments. This is subject to interpretation - * especially when it comes to quoting. If full control over the command line is needed please - * use the constructor that creates a `ShellExecution` with the full command line. - * - * @param command The command to execute. - * @param args The command arguments. - * @param options Optional options for the started the shell. - */ - constructor(command: string | ShellQuotedString, args: (string | ShellQuotedString)[], options?: ShellExecutionOptions); - - /** - * The shell command line. Is `undefined` if created with a command and arguments. - */ - commandLine: string; - - /** - * The shell command. Is `undefined` if created with a full command line. - */ - command: string | ShellQuotedString; - - /** - * The shell args. Is `undefined` if created with a full command line. - */ - args: (string | ShellQuotedString)[]; - - /** - * The shell options used when the command line is executed in a shell. - * Defaults to undefined. - */ - options?: ShellExecutionOptions; - } - - /** - * The scope of a task. - */ - export enum TaskScope { - /** - * The task is a global task. Global tasks are currrently not supported. - */ - Global = 1, - - /** - * The task is a workspace task - */ - Workspace = 2 - } - - /** - * Run options for a task. - */ - export interface RunOptions { - /** - * Controls whether task variables are re-evaluated on rerun. - */ - reevaluateOnRerun?: boolean; - } - - /** - * A task to execute - */ - export class Task { - - /** - * Creates a new task. - * - * @param definition The task definition as defined in the taskDefinitions extension point. - * @param scope Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder. Global tasks are currently not supported. - * @param name The task's name. Is presented in the user interface. - * @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface. - * @param execution The process or shell execution. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(taskDefinition: TaskDefinition, scope: WorkspaceFolder | TaskScope.Global | TaskScope.Workspace, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]); - - /** - * ~~Creates a new task.~~ - * - * @deprecated Use the new constructors that allow specifying a scope for the task. - * - * @param definition The task definition as defined in the taskDefinitions extension point. - * @param name The task's name. Is presented in the user interface. - * @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface. - * @param execution The process or shell execution. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(taskDefinition: TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]); - - /** - * The task's definition. - */ - definition: TaskDefinition; - - /** - * The task's scope. - */ - readonly scope?: TaskScope.Global | TaskScope.Workspace | WorkspaceFolder; - - /** - * The task's name - */ - name: string; - - /** - * The task's execution engine - */ - execution?: ProcessExecution | ShellExecution; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * A human-readable string describing the source of this - * shell task, e.g. 'gulp' or 'npm'. - */ - source: string; - - /** - * The task group this tasks belongs to. See TaskGroup - * for a predefined set of available groups. - * Defaults to undefined meaning that the task doesn't - * belong to any special group. - */ - group?: TaskGroup; - - /** - * The presentation options. Defaults to an empty literal. - */ - presentationOptions: TaskPresentationOptions; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: string[]; - - /** - * Run options for the task - */ - runOptions: RunOptions; - } - - /** - * A task provider allows to add tasks to the task service. - * A task provider is registered via #tasks.registerTaskProvider. - */ - export interface TaskProvider { - /** - * Provides tasks. - * @param token A cancellation token. - * @return an array of tasks - */ - provideTasks(token?: CancellationToken): ProviderResult; - - /** - * Resolves a task that has no [`execution`](#Task.execution) set. Tasks are - * often created from information found in the `tasks.json`-file. Such tasks miss - * the information on how to execute them and a task provider must fill in - * the missing information in the `resolveTask`-method. This method will not be - * called for tasks returned from the above `provideTasks` method since those - * tasks are always fully resolved. A valid default implementation for the - * `resolveTask` method is to return `undefined`. - * - * @param task The task to resolve. - * @param token A cancellation token. - * @return The resolved task - */ - resolveTask(task: Task, token?: CancellationToken): ProviderResult; - } - - /** - * An object representing an executed Task. It can be used - * to terminate a task. - * - * This interface is not intended to be implemented. - */ - export interface TaskExecution { - /** - * The task that got started. - */ - task: Task; - - /** - * Terminates the task execution. - */ - terminate(): void; - } - - /** - * An event signaling the start of a task execution. - * - * This interface is not intended to be implemented. - */ - interface TaskStartEvent { - /** - * The task item representing the task that got started. - */ - readonly execution: TaskExecution; - } - - /** - * An event signaling the end of an executed task. - * - * This interface is not intended to be implemented. - */ - interface TaskEndEvent { - /** - * The task item representing the task that finished. - */ - readonly execution: TaskExecution; - } - - /** - * An event signaling the start of a process execution - * triggered through a task - */ - export interface TaskProcessStartEvent { - - /** - * The task execution for which the process got started. - */ - readonly execution: TaskExecution; - - /** - * The underlying process id. - */ - readonly processId: number; - } - - /** - * An event signaling the end of a process execution - * triggered through a task - */ - export interface TaskProcessEndEvent { - - /** - * The task execution for which the process got started. - */ - readonly execution: TaskExecution; - - /** - * The process's exit code. - */ - readonly exitCode: number; - } - - export interface TaskFilter { - /** - * The task version as used in the tasks.json file. - * The string support the package.json semver notation. - */ - version?: string; - - /** - * The task type to return; - */ - type?: string; - } - - /** - * Namespace for tasks functionality. - */ - export namespace tasks { - - /** - * Register a task provider. - * - * @param type The task kind type this provider is registered for. - * @param provider A task provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTaskProvider(type: string, provider: TaskProvider): Disposable; - - /** - * Fetches all tasks available in the systems. This includes tasks - * from `tasks.json` files as well as tasks from task providers - * contributed through extensions. - * - * @param filter Optional filter to select tasks of a certain type or version. - */ - export function fetchTasks(filter?: TaskFilter): Thenable; - - /** - * Executes a task that is managed by VS Code. The returned - * task execution can be used to terminate the task. - * - * @param task the task to execute - */ - export function executeTask(task: Task): Thenable; - - /** - * The currently active task executions or an empty array. - */ - export const taskExecutions: ReadonlyArray; - - /** - * Fires when a task starts. - */ - export const onDidStartTask: Event; - - /** - * Fires when a task ends. - */ - export const onDidEndTask: Event; - - /** - * Fires when the underlying process has been started. - * This event will not fire for tasks that don't - * execute an underlying process. - */ - export const onDidStartTaskProcess: Event; - - /** - * Fires when the underlying process has ended. - * This event will not fire for tasks that don't - * execute an underlying process. - */ - export const onDidEndTaskProcess: Event; - } - - /** - * Enumeration of file types. The types `File` and `Directory` can also be - * a symbolic links, in that use `FileType.File | FileType.SymbolicLink` and - * `FileType.Directory | FileType.SymbolicLink`. - */ - export enum FileType { - /** - * The file type is unknown. - */ - Unknown = 0, - /** - * A regular file. - */ - File = 1, - /** - * A directory. - */ - Directory = 2, - /** - * A symbolic link to a file. - */ - SymbolicLink = 64 - } - - /** - * The `FileStat`-type represents metadata about a file - */ - export interface FileStat { - /** - * The type of the file, e.g. is a regular file, a directory, or symbolic link - * to a file. - */ - type: FileType; - /** - * The creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC. - */ - ctime: number; - /** - * The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC. - */ - mtime: number; - /** - * The size in bytes. - */ - size: number; - } - - /** - * A type that filesystem providers should use to signal errors. - * - * This class has factory methods for common error-cases, like `FileNotFound` when - * a file or folder doesn't exist, use them like so: `throw vscode.FileSystemError.FileNotFound(someUri);` - */ - export class FileSystemError extends Error { - - /** - * Create an error to signal that a file or folder wasn't found. - * @param messageOrUri Message or uri. - */ - static FileNotFound(messageOrUri?: string | Uri): FileSystemError; - - /** - * Create an error to signal that a file or folder already exists, e.g. when - * creating but not overwriting a file. - * @param messageOrUri Message or uri. - */ - static FileExists(messageOrUri?: string | Uri): FileSystemError; - - /** - * Create an error to signal that a file is not a folder. - * @param messageOrUri Message or uri. - */ - static FileNotADirectory(messageOrUri?: string | Uri): FileSystemError; - - /** - * Create an error to signal that a file is a folder. - * @param messageOrUri Message or uri. - */ - static FileIsADirectory(messageOrUri?: string | Uri): FileSystemError; - - /** - * Create an error to signal that an operation lacks required permissions. - * @param messageOrUri Message or uri. - */ - static NoPermissions(messageOrUri?: string | Uri): FileSystemError; - - /** - * Create an error to signal that the file system is unavailable or too busy to - * complete a request. - * @param messageOrUri Message or uri. - */ - static Unavailable(messageOrUri?: string | Uri): FileSystemError; - - /** - * Creates a new filesystem error. - * - * @param messageOrUri Message or uri. - */ - constructor(messageOrUri?: string | Uri); - } - - /** - * Enumeration of file change types. - */ - export enum FileChangeType { - - /** - * The contents or metadata of a file have changed. - */ - Changed = 1, - - /** - * A file has been created. - */ - Created = 2, - - /** - * A file has been deleted. - */ - Deleted = 3, - } - - /** - * The event filesystem providers must use to signal a file change. - */ - export interface FileChangeEvent { - - /** - * The type of change. - */ - readonly type: FileChangeType; - - /** - * The uri of the file that has changed. - */ - readonly uri: Uri; - } - - /** - * The filesystem provider defines what the editor needs to read, write, discover, - * and to manage files and folders. It allows extensions to serve files from remote places, - * like ftp-servers, and to seamlessly integrate those into the editor. - * - * * *Note 1:* The filesystem provider API works with [uris](#Uri) and assumes hierarchical - * paths, e.g. `foo:/my/path` is a child of `foo:/my/` and a parent of `foo:/my/path/deeper`. - * * *Note 2:* There is an activation event `onFileSystem:` that fires when a file - * or folder is being accessed. - * * *Note 3:* The word 'file' is often used to denote all [kinds](#FileType) of files, e.g. - * folders, symbolic links, and regular files. - */ - export interface FileSystemProvider { - - /** - * An event to signal that a resource has been created, changed, or deleted. This - * event should fire for resources that are being [watched](#FileSystemProvider.watch) - * by clients of this provider. - */ - readonly onDidChangeFile: Event; - - /** - * Subscribe to events in the file or folder denoted by `uri`. - * - * The editor will call this function for files and folders. In the latter case, the - * options differ from defaults, e.g. what files/folders to exclude from watching - * and if subfolders, sub-subfolder, etc. should be watched (`recursive`). - * - * @param uri The uri of the file to be watched. - * @param options Configures the watch. - * @returns A disposable that tells the provider to stop watching the `uri`. - */ - watch(uri: Uri, options: { recursive: boolean; excludes: string[] }): Disposable; - - /** - * Retrieve metadata about a file. - * - * Note that the metadata for symbolic links should be the metadata of the file they refer to. - * Still, the [SymbolicLink](#FileType.SymbolicLink)-type must be used in addition to the actual type, e.g. - * `FileType.SymbolicLink | FileType.Directory`. - * - * @param uri The uri of the file to retrieve metadata about. - * @return The file metadata about the file. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist. - */ - stat(uri: Uri): FileStat | Thenable; - - /** - * Retrieve all entries of a [directory](#FileType.Directory). - * - * @param uri The uri of the folder. - * @return An array of name/type-tuples or a thenable that resolves to such. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist. - */ - readDirectory(uri: Uri): [string, FileType][] | Thenable<[string, FileType][]>; - - /** - * Create a new directory (Note, that new files are created via `write`-calls). - * - * @param uri The uri of the new folder. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when the parent of `uri` doesn't exist, e.g. no mkdirp-logic required. - * @throws [`FileExists`](#FileSystemError.FileExists) when `uri` already exists. - * @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient. - */ - createDirectory(uri: Uri): void | Thenable; - - /** - * Read the entire contents of a file. - * - * @param uri The uri of the file. - * @return An array of bytes or a thenable that resolves to such. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist. - */ - readFile(uri: Uri): Uint8Array | Thenable; - - /** - * Write data to a file, replacing its entire contents. - * - * @param uri The uri of the file. - * @param content The new content of the file. - * @param options Defines if missing files should or must be created. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist and `create` is not set. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when the parent of `uri` doesn't exist and `create` is set, e.g. no mkdirp-logic required. - * @throws [`FileExists`](#FileSystemError.FileExists) when `uri` already exists, `create` is set but `overwrite` is not set. - * @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient. - */ - writeFile(uri: Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void | Thenable; - - /** - * Delete a file. - * - * @param uri The resource that is to be deleted. - * @param options Defines if deletion of folders is recursive. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist. - * @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient. - */ - delete(uri: Uri, options: { recursive: boolean }): void | Thenable; - - /** - * Rename a file or folder. - * - * @param oldUri The existing file. - * @param newUri The new location. - * @param options Defines if existing files should be overwritten. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `oldUri` doesn't exist. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when parent of `newUri` doesn't exist, e.g. no mkdirp-logic required. - * @throws [`FileExists`](#FileSystemError.FileExists) when `newUri` exists and when the `overwrite` option is not `true`. - * @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient. - */ - rename(oldUri: Uri, newUri: Uri, options: { overwrite: boolean }): void | Thenable; - - /** - * Copy files or folders. Implementing this function is optional but it will speedup - * the copy operation. - * - * @param source The existing file. - * @param destination The destination location. - * @param options Defines if existing files should be overwritten. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `source` doesn't exist. - * @throws [`FileNotFound`](#FileSystemError.FileNotFound) when parent of `destination` doesn't exist, e.g. no mkdirp-logic required. - * @throws [`FileExists`](#FileSystemError.FileExists) when `destination` exists and when the `overwrite` option is not `true`. - * @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient. - */ - copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void | Thenable; - } - - /** - * The file system interface exposes the editor's built-in and contributed - * [file system providers](#FileSystemProvider). It allows extensions to work - * with files from the local disk as well as files from remote places, like the - * remote extension host or ftp-servers. - * - * *Note* that an instance of this interface is avaiable as [`workspace.fs`](#workspace.fs). - */ - export interface FileSystem { - - /** - * Retrieve metadata about a file. - * - * @param uri The uri of the file to retrieve metadata about. - * @return The file metadata about the file. - */ - stat(uri: Uri): Thenable; - - /** - * Retrieve all entries of a [directory](#FileType.Directory). - * - * @param uri The uri of the folder. - * @return An array of name/type-tuples or a thenable that resolves to such. - */ - readDirectory(uri: Uri): Thenable<[string, FileType][]>; - - /** - * Create a new directory (Note, that new files are created via `write`-calls). - * - * @param uri The uri of the new folder. - */ - createDirectory(uri: Uri): Thenable; - - /** - * Read the entire contents of a file. - * - * @param uri The uri of the file. - * @return An array of bytes or a thenable that resolves to such. - */ - readFile(uri: Uri): Thenable; - - /** - * Write data to a file, replacing its entire contents. - * - * @param uri The uri of the file. - * @param content The new content of the file. - */ - writeFile(uri: Uri, content: Uint8Array): Thenable; - - /** - * Delete a file. - * - * @param uri The resource that is to be deleted. - * @param options Defines if trash can should be used and if deletion of folders is recursive - */ - delete(uri: Uri, options?: { recursive?: boolean, useTrash?: boolean }): Thenable; - - /** - * Rename a file or folder. - * - * @param oldUri The existing file. - * @param newUri The new location. - * @param options Defines if existing files should be overwritten. - */ - rename(source: Uri, target: Uri, options?: { overwrite?: boolean }): Thenable; - - /** - * Copy files or folders. - * - * @param source The existing file. - * @param destination The destination location. - * @param options Defines if existing files should be overwritten. - */ - copy(source: Uri, target: Uri, options?: { overwrite?: boolean }): Thenable; - } - - /** - * Defines a port mapping used for localhost inside the webview. - */ - export interface WebviewPortMapping { - /** - * Localhost port to remap inside the webview. - */ - readonly webviewPort: number; - - /** - * Destination port. The `webviewPort` is resolved to this port. - */ - readonly extensionHostPort: number; - } - - /** - * Content settings for a webview. - */ - export interface WebviewOptions { - /** - * Controls whether scripts are enabled in the webview content or not. - * - * Defaults to false (scripts-disabled). - */ - readonly enableScripts?: boolean; - - /** - * Controls whether command uris are enabled in webview content or not. - * - * Defaults to false. - */ - readonly enableCommandUris?: boolean; - - /** - * Root paths from which the webview can load local (filesystem) resources using the `vscode-resource:` scheme. - * - * Default to the root folders of the current workspace plus the extension's install directory. - * - * Pass in an empty array to disallow access to any local resources. - */ - readonly localResourceRoots?: ReadonlyArray; - - /** - * Mappings of localhost ports used inside the webview. - * - * Port mapping allow webviews to transparently define how localhost ports are resolved. This can be used - * to allow using a static localhost port inside the webview that is resolved to random port that a service is - * running on. - * - * If a webview accesses localhost content, we recommend that you specify port mappings even if - * the `webviewPort` and `extensionHostPort` ports are the same. - * - * *Note* that port mappings only work for `http` or `https` urls. Websocket urls (e.g. `ws://localhost:3000`) - * cannot be mapped to another port. - */ - readonly portMapping?: ReadonlyArray; - } - - /** - * A webview displays html content, like an iframe. - */ - export interface Webview { - /** - * Content settings for the webview. - */ - options: WebviewOptions; - - /** - * Contents of the webview. - * - * Should be a complete html document. - */ - html: string; - - /** - * Fired when the webview content posts a message. - * - * Webview content can post strings or json serilizable objects back to a VS Code extension. They cannot - * post `Blob`, `File`, `ImageData` and other DOM specific objects since the extension that receives the - * message does not run in a browser environment. - */ - readonly onDidReceiveMessage: Event; - - /** - * Post a message to the webview content. - * - * Messages are only delivered if the webview is live (either visible or in the - * background with `retainContextWhenHidden`). - * - * @param message Body of the message. This must be a string or other json serilizable object. - */ - postMessage(message: any): Thenable; - - /** - * Convert a uri for the local file system to one that can be used inside webviews. - * - * Webviews cannot directly load resources from the workspace or local file system using `file:` uris. The - * `asWebviewUri` function takes a local `file:` uri and converts it into a uri that can be used inside of - * a webview to load the same resource: - * - * ```ts - * webview.html = `` - * ``` - */ - asWebviewUri(localResource: Uri): Uri; - - /** - * Content security policy source for webview resources. - * - * This is the origin that should be used in a content security policy rule: - * - * ``` - * img-src https: ${webview.cspSource} ...; - * ``` - */ - readonly cspSource: string; - } - - /** - * Content settings for a webview panel. - */ - export interface WebviewPanelOptions { - /** - * Controls if the find widget is enabled in the panel. - * - * Defaults to false. - */ - readonly enableFindWidget?: boolean; - - /** - * Controls if the webview panel's content (iframe) is kept around even when the panel - * is no longer visible. - * - * Normally the webview panel's html context is created when the panel becomes visible - * and destroyed when it is hidden. Extensions that have complex state - * or UI can set the `retainContextWhenHidden` to make VS Code keep the webview - * context around, even when the webview moves to a background tab. When a webview using - * `retainContextWhenHidden` becomes hidden, its scripts and other dynamic content are suspended. - * When the panel becomes visible again, the context is automatically restored - * in the exact same state it was in originally. You cannot send messages to a - * hidden webview, even with `retainContextWhenHidden` enabled. - * - * `retainContextWhenHidden` has a high memory overhead and should only be used if - * your panel's context cannot be quickly saved and restored. - */ - readonly retainContextWhenHidden?: boolean; - } - - /** - * A panel that contains a webview. - */ - interface WebviewPanel { - /** - * Identifies the type of the webview panel, such as `'markdown.preview'`. - */ - readonly viewType: string; - - /** - * Title of the panel shown in UI. - */ - title: string; - - /** - * Icon for the panel shown in UI. - */ - iconPath?: Uri | { light: Uri; dark: Uri }; - - /** - * Webview belonging to the panel. - */ - readonly webview: Webview; - - /** - * Content settings for the webview panel. - */ - readonly options: WebviewPanelOptions; - - /** - * Editor position of the panel. This property is only set if the webview is in - * one of the editor view columns. - */ - readonly viewColumn?: ViewColumn; - - /** - * Whether the panel is active (focused by the user). - */ - readonly active: boolean; - - /** - * Whether the panel is visible. - */ - readonly visible: boolean; - - /** - * Fired when the panel's view state changes. - */ - readonly onDidChangeViewState: Event; - - /** - * Fired when the panel is disposed. - * - * This may be because the user closed the panel or because `.dispose()` was - * called on it. - * - * Trying to use the panel after it has been disposed throws an exception. - */ - readonly onDidDispose: Event; - - /** - * Show the webview panel in a given column. - * - * A webview panel may only show in a single column at a time. If it is already showing, this - * method moves it to a new column. - * - * @param viewColumn View column to show the panel in. Shows in the current `viewColumn` if undefined. - * @param preserveFocus When `true`, the webview will not take focus. - */ - reveal(viewColumn?: ViewColumn, preserveFocus?: boolean): void; - - /** - * Dispose of the webview panel. - * - * This closes the panel if it showing and disposes of the resources owned by the webview. - * Webview panels are also disposed when the user closes the webview panel. Both cases - * fire the `onDispose` event. - */ - dispose(): any; - } - - /** - * Event fired when a webview panel's view state changes. - */ - export interface WebviewPanelOnDidChangeViewStateEvent { - /** - * Webview panel whose view state changed. - */ - readonly webviewPanel: WebviewPanel; - } - - /** - * Restore webview panels that have been persisted when vscode shuts down. - * - * There are two types of webview persistence: - * - * - Persistence within a session. - * - Persistence across sessions (across restarts of VS Code). - * - * A `WebviewPanelSerializer` is only required for the second case: persisting a webview across sessions. - * - * Persistence within a session allows a webview to save its state when it becomes hidden - * and restore its content from this state when it becomes visible again. It is powered entirely - * by the webview content itself. To save off a persisted state, call `acquireVsCodeApi().setState()` with - * any json serializable object. To restore the state again, call `getState()` - * - * ```js - * // Within the webview - * const vscode = acquireVsCodeApi(); - * - * // Get existing state - * const oldState = vscode.getState() || { value: 0 }; - * - * // Update state - * setState({ value: oldState.value + 1 }) - * ``` - * - * A `WebviewPanelSerializer` extends this persistence across restarts of VS Code. When the editor is shutdown, - * VS Code will save off the state from `setState` of all webviews that have a serializer. When the - * webview first becomes visible after the restart, this state is passed to `deserializeWebviewPanel`. - * The extension can then restore the old `WebviewPanel` from this state. - */ - interface WebviewPanelSerializer { - /** - * Restore a webview panel from its serialized `state`. - * - * Called when a serialized webview first becomes visible. - * - * @param webviewPanel Webview panel to restore. The serializer should take ownership of this panel. The - * serializer must restore the webview's `.html` and hook up all webview events. - * @param state Persisted state from the webview content. - * - * @return Thenable indicating that the webview has been fully restored. - */ - deserializeWebviewPanel(webviewPanel: WebviewPanel, state: any): Thenable; - } - - /** - * The clipboard provides read and write access to the system's clipboard. - */ - export interface Clipboard { - - /** - * Read the current clipboard contents as text. - * @returns A thenable that resolves to a string. - */ - readText(): Thenable; - - /** - * Writes text into the clipboard. - * @returns A thenable that resolves when writing happened. - */ - writeText(value: string): Thenable; - } - - /** - * Namespace describing the environment the editor runs in. - */ - export namespace env { - - /** - * The application name of the editor, like 'VS Code'. - */ - export const appName: string; - - /** - * The application root folder from which the editor is running. - */ - export const appRoot: string; - - /** - * The custom uri scheme the editor registers to in the operating system. - */ - export const uriScheme: string; - - /** - * Represents the preferred user-language, like `de-CH`, `fr`, or `en-US`. - */ - export const language: string; - - /** - * The system clipboard. - */ - export const clipboard: Clipboard; - - /** - * A unique identifier for the computer. - */ - export const machineId: string; - - /** - * A unique identifier for the current session. - * Changes each time the editor is started. - */ - export const sessionId: string; - - /** - * The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows - * Subsystem for Linux or `ssh-remote` for remotes using a secure shell. - * - * *Note* that the value is `undefined` when there is no remote extension host but that the - * value is defined in all extension hosts (local and remote) in case a remote extension host - * exists. Use [`Extension#extensionKind`](#Extension.extensionKind) to know if - * a specific extension runs remote or not. - */ - export const remoteName: string | undefined; - - /** - * The detected default shell for the extension host, this is overridden by the - * `terminal.integrated.shell` setting for the extension host's platform. - */ - export const shell: string; - - /** - * Opens an *external* item, e.g. a http(s) or mailto-link, using the - * default application. - * - * *Note* that [`showTextDocument`](#window.showTextDocument) is the right - * way to open a text document inside the editor, not this function. - * - * @param target The uri that should be opened. - * @returns A promise indicating if open was successful. - */ - export function openExternal(target: Uri): Thenable; - } - - /** - * Namespace for dealing with commands. In short, a command is a function with a - * unique identifier. The function is sometimes also called _command handler_. - * - * Commands can be added to the editor using the [registerCommand](#commands.registerCommand) - * and [registerTextEditorCommand](#commands.registerTextEditorCommand) functions. Commands - * can be executed [manually](#commands.executeCommand) or from a UI gesture. Those are: - * - * * palette - Use the `commands`-section in `package.json` to make a command show in - * the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette). - * * keybinding - Use the `keybindings`-section in `package.json` to enable - * [keybindings](https://code.visualstudio.com/docs/getstarted/keybindings#_customizing-shortcuts) - * for your extension. - * - * Commands from other extensions and from the editor itself are accessible to an extension. However, - * when invoking an editor command not all argument types are supported. - * - * This is a sample that registers a command handler and adds an entry for that command to the palette. First - * register a command handler with the identifier `extension.sayHello`. - * ```javascript - * commands.registerCommand('extension.sayHello', () => { - * window.showInformationMessage('Hello World!'); - * }); - * ``` - * Second, bind the command identifier to a title under which it will show in the palette (`package.json`). - * ```json - * { - * "contributes": { - * "commands": [{ - * "command": "extension.sayHello", - * "title": "Hello World" - * }] - * } - * } - * ``` - */ - export namespace commands { - - /** - * Registers a command that can be invoked via a keyboard shortcut, - * a menu item, an action, or directly. - * - * Registering a command with an existing command identifier twice - * will cause an error. - * - * @param command A unique identifier for the command. - * @param callback A command handler function. - * @param thisArg The `this` context used when invoking the handler function. - * @return Disposable which unregisters this command on disposal. - */ - export function registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable; - - /** - * Registers a text editor command that can be invoked via a keyboard shortcut, - * a menu item, an action, or directly. - * - * Text editor commands are different from ordinary [commands](#commands.registerCommand) as - * they only execute when there is an active editor when the command is called. Also, the - * command handler of an editor command has access to the active editor and to an - * [edit](#TextEditorEdit)-builder. - * - * @param command A unique identifier for the command. - * @param callback A command handler function with access to an [editor](#TextEditor) and an [edit](#TextEditorEdit). - * @param thisArg The `this` context used when invoking the handler function. - * @return Disposable which unregisters this command on disposal. - */ - export function registerTextEditorCommand(command: string, callback: (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => void, thisArg?: any): Disposable; - - /** - * Executes the command denoted by the given command identifier. - * - * * *Note 1:* When executing an editor command not all types are allowed to - * be passed as arguments. Allowed are the primitive types `string`, `boolean`, - * `number`, `undefined`, and `null`, as well as [`Position`](#Position), [`Range`](#Range), [`Uri`](#Uri) and [`Location`](#Location). - * * *Note 2:* There are no restrictions when executing commands that have been contributed - * by extensions. - * - * @param command Identifier of the command to execute. - * @param rest Parameters passed to the command function. - * @return A thenable that resolves to the returned value of the given command. `undefined` when - * the command handler function doesn't return anything. - */ - export function executeCommand(command: string, ...rest: any[]): Thenable; - - /** - * Retrieve the list of all available commands. Commands starting an underscore are - * treated as internal commands. - * - * @param filterInternal Set `true` to not see internal commands (starting with an underscore) - * @return Thenable that resolves to a list of command ids. - */ - export function getCommands(filterInternal?: boolean): Thenable; - } - - /** - * Represents the state of a window. - */ - export interface WindowState { - - /** - * Whether the current window is focused. - */ - readonly focused: boolean; - } - - /** - * A uri handler is responsible for handling system-wide [uris](#Uri). - * - * @see [window.registerUriHandler](#window.registerUriHandler). - */ - export interface UriHandler { - - /** - * Handle the provided system-wide [uri](#Uri). - * - * @see [window.registerUriHandler](#window.registerUriHandler). - */ - handleUri(uri: Uri): ProviderResult; - } - - /** - * Namespace for dealing with the current window of the editor. That is visible - * and active editors, as well as, UI elements to show messages, selections, and - * asking for user input. - */ - export namespace window { - - /** - * The currently active editor or `undefined`. The active editor is the one - * that currently has focus or, when none has focus, the one that has changed - * input most recently. - */ - export let activeTextEditor: TextEditor | undefined; - - /** - * The currently visible editors or an empty array. - */ - export let visibleTextEditors: TextEditor[]; - - /** - * An [event](#Event) which fires when the [active editor](#window.activeTextEditor) - * has changed. *Note* that the event also fires when the active editor changes - * to `undefined`. - */ - export const onDidChangeActiveTextEditor: Event; - - /** - * An [event](#Event) which fires when the array of [visible editors](#window.visibleTextEditors) - * has changed. - */ - export const onDidChangeVisibleTextEditors: Event; - - /** - * An [event](#Event) which fires when the selection in an editor has changed. - */ - export const onDidChangeTextEditorSelection: Event; - - /** - * An [event](#Event) which fires when the visible ranges of an editor has changed. - */ - export const onDidChangeTextEditorVisibleRanges: Event; - - /** - * An [event](#Event) which fires when the options of an editor have changed. - */ - export const onDidChangeTextEditorOptions: Event; - - /** - * An [event](#Event) which fires when the view column of an editor has changed. - */ - export const onDidChangeTextEditorViewColumn: Event; - - /** - * The currently opened terminals or an empty array. - */ - export const terminals: ReadonlyArray; - - /** - * The currently active terminal or `undefined`. The active terminal is the one that - * currently has focus or most recently had focus. - */ - export const activeTerminal: Terminal | undefined; - - /** - * An [event](#Event) which fires when the [active terminal](#window.activeTerminal) - * has changed. *Note* that the event also fires when the active terminal changes - * to `undefined`. - */ - export const onDidChangeActiveTerminal: Event; - - /** - * An [event](#Event) which fires when a terminal has been created, either through the - * [createTerminal](#window.createTerminal) API or commands. - */ - export const onDidOpenTerminal: Event; - - /** - * An [event](#Event) which fires when a terminal is disposed. - */ - export const onDidCloseTerminal: Event; - - /** - * Represents the current window's state. - */ - export const state: WindowState; - - /** - * An [event](#Event) which fires when the focus state of the current window - * changes. The value of the event represents whether the window is focused. - */ - export const onDidChangeWindowState: Event; - - /** - * Show the given document in a text editor. A [column](#ViewColumn) can be provided - * to control where the editor is being shown. Might change the [active editor](#window.activeTextEditor). - * - * @param document A text document to be shown. - * @param column A view column in which the [editor](#TextEditor) should be shown. The default is the [active](#ViewColumn.Active), other values - * are adjusted to be `Min(column, columnCount + 1)`, the [active](#ViewColumn.Active)-column is not adjusted. Use [`ViewColumn.Beside`](#ViewColumn.Beside) - * to open the editor to the side of the currently active one. - * @param preserveFocus When `true` the editor will not take focus. - * @return A promise that resolves to an [editor](#TextEditor). - */ - export function showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable; - - /** - * Show the given document in a text editor. [Options](#TextDocumentShowOptions) can be provided - * to control options of the editor is being shown. Might change the [active editor](#window.activeTextEditor). - * - * @param document A text document to be shown. - * @param options [Editor options](#TextDocumentShowOptions) to configure the behavior of showing the [editor](#TextEditor). - * @return A promise that resolves to an [editor](#TextEditor). - */ - export function showTextDocument(document: TextDocument, options?: TextDocumentShowOptions): Thenable; - - /** - * A short-hand for `openTextDocument(uri).then(document => showTextDocument(document, options))`. - * - * @see [openTextDocument](#openTextDocument) - * - * @param uri A resource identifier. - * @param options [Editor options](#TextDocumentShowOptions) to configure the behavior of showing the [editor](#TextEditor). - * @return A promise that resolves to an [editor](#TextEditor). - */ - export function showTextDocument(uri: Uri, options?: TextDocumentShowOptions): Thenable; - - /** - * Create a TextEditorDecorationType that can be used to add decorations to text editors. - * - * @param options Rendering options for the decoration type. - * @return A new decoration type instance. - */ - export function createTextEditorDecorationType(options: DecorationRenderOptions): TextEditorDecorationType; - - /** - * Show an information message to users. Optionally provide an array of items which will be presented as - * clickable buttons. - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showInformationMessage(message: string, ...items: string[]): Thenable; - - /** - * Show an information message to users. Optionally provide an array of items which will be presented as - * clickable buttons. - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showInformationMessage(message: string, options: MessageOptions, ...items: string[]): Thenable; - - /** - * Show an information message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showInformationMessage(message: string, ...items: T[]): Thenable; - - /** - * Show an information message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showInformationMessage(message: string, options: MessageOptions, ...items: T[]): Thenable; - - /** - * Show a warning message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showWarningMessage(message: string, ...items: string[]): Thenable; - - /** - * Show a warning message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showWarningMessage(message: string, options: MessageOptions, ...items: string[]): Thenable; - - /** - * Show a warning message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showWarningMessage(message: string, ...items: T[]): Thenable; - - /** - * Show a warning message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showWarningMessage(message: string, options: MessageOptions, ...items: T[]): Thenable; - - /** - * Show an error message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showErrorMessage(message: string, ...items: string[]): Thenable; - - /** - * Show an error message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showErrorMessage(message: string, options: MessageOptions, ...items: string[]): Thenable; - - /** - * Show an error message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showErrorMessage(message: string, ...items: T[]): Thenable; - - /** - * Show an error message. - * - * @see [showInformationMessage](#window.showInformationMessage) - * - * @param message The message to show. - * @param options Configures the behaviour of the message. - * @param items A set of items that will be rendered as actions in the message. - * @return A thenable that resolves to the selected item or `undefined` when being dismissed. - */ - export function showErrorMessage(message: string, options: MessageOptions, ...items: T[]): Thenable; - - /** - * Shows a selection list allowing multiple selections. - * - * @param items An array of strings, or a promise that resolves to an array of strings. - * @param options Configures the behavior of the selection list. - * @param token A token that can be used to signal cancellation. - * @return A promise that resolves to the selected items or `undefined`. - */ - export function showQuickPick(items: string[] | Thenable, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable; - - /** - * Shows a selection list. - * - * @param items An array of strings, or a promise that resolves to an array of strings. - * @param options Configures the behavior of the selection list. - * @param token A token that can be used to signal cancellation. - * @return A promise that resolves to the selection or `undefined`. - */ - export function showQuickPick(items: string[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; - - /** - * Shows a selection list allowing multiple selections. - * - * @param items An array of items, or a promise that resolves to an array of items. - * @param options Configures the behavior of the selection list. - * @param token A token that can be used to signal cancellation. - * @return A promise that resolves to the selected items or `undefined`. - */ - export function showQuickPick(items: T[] | Thenable, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable; - - /** - * Shows a selection list. - * - * @param items An array of items, or a promise that resolves to an array of items. - * @param options Configures the behavior of the selection list. - * @param token A token that can be used to signal cancellation. - * @return A promise that resolves to the selected item or `undefined`. - */ - export function showQuickPick(items: T[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; - - /** - * Shows a selection list of [workspace folders](#workspace.workspaceFolders) to pick from. - * Returns `undefined` if no folder is open. - * - * @param options Configures the behavior of the workspace folder list. - * @return A promise that resolves to the workspace folder or `undefined`. - */ - export function showWorkspaceFolderPick(options?: WorkspaceFolderPickOptions): Thenable; - - /** - * Shows a file open dialog to the user which allows to select a file - * for opening-purposes. - * - * @param options Options that control the dialog. - * @returns A promise that resolves to the selected resources or `undefined`. - */ - export function showOpenDialog(options: OpenDialogOptions): Thenable; - - /** - * Shows a file save dialog to the user which allows to select a file - * for saving-purposes. - * - * @param options Options that control the dialog. - * @returns A promise that resolves to the selected resource or `undefined`. - */ - export function showSaveDialog(options: SaveDialogOptions): Thenable; - - /** - * Opens an input box to ask the user for input. - * - * The returned value will be `undefined` if the input box was canceled (e.g. pressing ESC). Otherwise the - * returned value will be the string typed by the user or an empty string if the user did not type - * anything but dismissed the input box with OK. - * - * @param options Configures the behavior of the input box. - * @param token A token that can be used to signal cancellation. - * @return A promise that resolves to a string the user provided or to `undefined` in case of dismissal. - */ - export function showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable; - - /** - * Creates a [QuickPick](#QuickPick) to let the user pick an item from a list - * of items of type T. - * - * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick) - * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used - * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility. - * - * @return A new [QuickPick](#QuickPick). - */ - export function createQuickPick(): QuickPick; - - /** - * Creates a [InputBox](#InputBox) to let the user enter some text input. - * - * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox) - * is easier to use. [window.createInputBox](#window.createInputBox) should be used - * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility. - * - * @return A new [InputBox](#InputBox). - */ - export function createInputBox(): InputBox; - - /** - * Creates a new [output channel](#OutputChannel) with the given name. - * - * @param name Human-readable string which will be used to represent the channel in the UI. - */ - export function createOutputChannel(name: string): OutputChannel; - - /** - * Create and show a new webview panel. - * - * @param viewType Identifies the type of the webview panel. - * @param title Title of the panel. - * @param showOptions Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus. - * @param options Settings for the new panel. - * - * @return New webview panel. - */ - export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | { viewColumn: ViewColumn, preserveFocus?: boolean }, options?: WebviewPanelOptions & WebviewOptions): WebviewPanel; - - /** - * Set a message to the status bar. This is a short hand for the more powerful - * status bar [items](#window.createStatusBarItem). - * - * @param text The message to show, supports icon substitution as in status bar [items](#StatusBarItem.text). - * @param hideAfterTimeout Timeout in milliseconds after which the message will be disposed. - * @return A disposable which hides the status bar message. - */ - export function setStatusBarMessage(text: string, hideAfterTimeout: number): Disposable; - - /** - * Set a message to the status bar. This is a short hand for the more powerful - * status bar [items](#window.createStatusBarItem). - * - * @param text The message to show, supports icon substitution as in status bar [items](#StatusBarItem.text). - * @param hideWhenDone Thenable on which completion (resolve or reject) the message will be disposed. - * @return A disposable which hides the status bar message. - */ - export function setStatusBarMessage(text: string, hideWhenDone: Thenable): Disposable; - - /** - * Set a message to the status bar. This is a short hand for the more powerful - * status bar [items](#window.createStatusBarItem). - * - * *Note* that status bar messages stack and that they must be disposed when no - * longer used. - * - * @param text The message to show, supports icon substitution as in status bar [items](#StatusBarItem.text). - * @return A disposable which hides the status bar message. - */ - export function setStatusBarMessage(text: string): Disposable; - - /** - * ~~Show progress in the Source Control viewlet while running the given callback and while - * its returned promise isn't resolve or rejected.~~ - * - * @deprecated Use `withProgress` instead. - * - * @param task A callback returning a promise. Progress increments can be reported with - * the provided [progress](#Progress)-object. - * @return The thenable the task did return. - */ - export function withScmProgress(task: (progress: Progress) => Thenable): Thenable; - - /** - * Show progress in the editor. Progress is shown while running the given callback - * and while the promise it returned isn't resolved nor rejected. The location at which - * progress should show (and other details) is defined via the passed [`ProgressOptions`](#ProgressOptions). - * - * @param task A callback returning a promise. Progress state can be reported with - * the provided [progress](#Progress)-object. - * - * To report discrete progress, use `increment` to indicate how much work has been completed. Each call with - * a `increment` value will be summed up and reflected as overall progress until 100% is reached (a value of - * e.g. `10` accounts for `10%` of work done). - * Note that currently only `ProgressLocation.Notification` is capable of showing discrete progress. - * - * To monitor if the operation has been cancelled by the user, use the provided [`CancellationToken`](#CancellationToken). - * Note that currently only `ProgressLocation.Notification` is supporting to show a cancel button to cancel the - * long running operation. - * - * @return The thenable the task-callback returned. - */ - export function withProgress(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable): Thenable; - - /** - * Creates a status bar [item](#StatusBarItem). - * - * @param alignment The alignment of the item. - * @param priority The priority of the item. Higher values mean the item should be shown more to the left. - * @return A new status bar item. - */ - export function createStatusBarItem(alignment?: StatusBarAlignment, priority?: number): StatusBarItem; - - /** - * Creates a [Terminal](#Terminal) with a backing shell process. The cwd of the terminal will be the workspace - * directory if it exists. - * - * @param name Optional human-readable string which will be used to represent the terminal in the UI. - * @param shellPath Optional path to a custom shell executable to be used in the terminal. - * @param shellArgs Optional args for the custom shell executable. A string can be used on Windows only which - * allows specifying shell args in - * [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6). - * @return A new Terminal. - */ - export function createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): Terminal; - - /** - * Creates a [Terminal](#Terminal) with a backing shell process. - * - * @param options A TerminalOptions object describing the characteristics of the new terminal. - * @return A new Terminal. - */ - export function createTerminal(options: TerminalOptions): Terminal; - - /** - * Creates a [Terminal](#Terminal) where an extension controls its input and output. - * - * @param options An [ExtensionTerminalOptions](#ExtensionTerminalOptions) object describing - * the characteristics of the new terminal. - * @return A new Terminal. - */ - export function createTerminal(options: ExtensionTerminalOptions): Terminal; - - /** - * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. - * This will allow you to contribute data to the [TreeView](#TreeView) and update if the data changes. - * - * **Note:** To get access to the [TreeView](#TreeView) and perform operations on it, use [createTreeView](#window.createTreeView). - * - * @param viewId Id of the view contributed using the extension point `views`. - * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view - */ - export function registerTreeDataProvider(viewId: string, treeDataProvider: TreeDataProvider): Disposable; - - /** - * Create a [TreeView](#TreeView) for the view contributed using the extension point `views`. - * @param viewId Id of the view contributed using the extension point `views`. - * @param options Options for creating the [TreeView](#TreeView) - * @returns a [TreeView](#TreeView). - */ - export function createTreeView(viewId: string, options: TreeViewOptions): TreeView; - - /** - * Registers a [uri handler](#UriHandler) capable of handling system-wide [uris](#Uri). - * In case there are multiple windows open, the topmost window will handle the uri. - * A uri handler is scoped to the extension it is contributed from; it will only - * be able to handle uris which are directed to the extension itself. A uri must respect - * the following rules: - * - * - The uri-scheme must be `vscode.env.uriScheme`; - * - The uri-authority must be the extension id (e.g. `my.extension`); - * - The uri-path, -query and -fragment parts are arbitrary. - * - * For example, if the `my.extension` extension registers a uri handler, it will only - * be allowed to handle uris with the prefix `product-name://my.extension`. - * - * An extension can only register a single uri handler in its entire activation lifetime. - * - * * *Note:* There is an activation event `onUri` that fires when a uri directed for - * the current extension is about to be handled. - * - * @param handler The uri handler to register for this extension. - */ - export function registerUriHandler(handler: UriHandler): Disposable; - - /** - * Registers a webview panel serializer. - * - * Extensions that support reviving should have an `"onWebviewPanel:viewType"` activation event and - * make sure that [registerWebviewPanelSerializer](#registerWebviewPanelSerializer) is called during activation. - * - * Only a single serializer may be registered at a time for a given `viewType`. - * - * @param viewType Type of the webview panel that can be serialized. - * @param serializer Webview serializer. - */ - export function registerWebviewPanelSerializer(viewType: string, serializer: WebviewPanelSerializer): Disposable; - } - - /** - * Options for creating a [TreeView](#TreeView) - */ - export interface TreeViewOptions { - - /** - * A data provider that provides tree data. - */ - treeDataProvider: TreeDataProvider; - - /** - * Whether to show collapse all action or not. - */ - showCollapseAll?: boolean; - - /** - * Whether the tree supports multi-select. When the tree supports multi-select and a command is executed from the tree, - * the first argument to the command is the tree item that the command was executed on and the second argument is an - * array containing all selected tree items. - */ - canSelectMany?: boolean; - } - - /** - * The event that is fired when an element in the [TreeView](#TreeView) is expanded or collapsed - */ - export interface TreeViewExpansionEvent { - - /** - * Element that is expanded or collapsed. - */ - readonly element: T; - - } - - /** - * The event that is fired when there is a change in [tree view's selection](#TreeView.selection) - */ - export interface TreeViewSelectionChangeEvent { - - /** - * Selected elements. - */ - readonly selection: T[]; - - } - - /** - * The event that is fired when there is a change in [tree view's visibility](#TreeView.visible) - */ - export interface TreeViewVisibilityChangeEvent { - - /** - * `true` if the [tree view](#TreeView) is visible otherwise `false`. - */ - readonly visible: boolean; - - } - - /** - * Represents a Tree view - */ - export interface TreeView extends Disposable { - - /** - * Event that is fired when an element is expanded - */ - readonly onDidExpandElement: Event>; - - /** - * Event that is fired when an element is collapsed - */ - readonly onDidCollapseElement: Event>; - - /** - * Currently selected elements. - */ - readonly selection: T[]; - - /** - * Event that is fired when the [selection](#TreeView.selection) has changed - */ - readonly onDidChangeSelection: Event>; - - /** - * `true` if the [tree view](#TreeView) is visible otherwise `false`. - */ - readonly visible: boolean; - - /** - * Event that is fired when [visibility](#TreeView.visible) has changed - */ - readonly onDidChangeVisibility: Event; - - /** - * An optional human-readable message that will be rendered in the view. - * Setting the message to null, undefined, or empty string will remove the message from the view. - */ - message?: string; - - /** - * Reveals the given element in the tree view. - * If the tree view is not visible then the tree view is shown and element is revealed. - * - * By default revealed element is selected. - * In order to not to select, set the option `select` to `false`. - * In order to focus, set the option `focus` to `true`. - * In order to expand the revealed element, set the option `expand` to `true`. To expand recursively set `expand` to the number of levels to expand. - * **NOTE:** You can expand only to 3 levels maximum. - * - * **NOTE:** [TreeDataProvider](#TreeDataProvider) is required to implement [getParent](#TreeDataProvider.getParent) method to access this API. - */ - reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }): Thenable; - } - - /** - * A data provider that provides tree data - */ - export interface TreeDataProvider { - /** - * An optional event to signal that an element or root has changed. - * This will trigger the view to update the changed element/root and its children recursively (if shown). - * To signal that root has changed, do not pass any argument or pass `undefined` or `null`. - */ - onDidChangeTreeData?: Event; - - /** - * Get [TreeItem](#TreeItem) representation of the `element` - * - * @param element The element for which [TreeItem](#TreeItem) representation is asked for. - * @return [TreeItem](#TreeItem) representation of the element - */ - getTreeItem(element: T): TreeItem | Thenable; - - /** - * Get the children of `element` or root if no element is passed. - * - * @param element The element from which the provider gets children. Can be `undefined`. - * @return Children of `element` or root if no element is passed. - */ - getChildren(element?: T): ProviderResult; - - /** - * Optional method to return the parent of `element`. - * Return `null` or `undefined` if `element` is a child of root. - * - * **NOTE:** This method should be implemented in order to access [reveal](#TreeView.reveal) API. - * - * @param element The element for which the parent has to be returned. - * @return Parent of `element`. - */ - getParent?(element: T): ProviderResult; - } - - export class TreeItem { - /** - * A human-readable string describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri). - */ - label?: string; - - /** - * Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item. - * - * If not provided, an id is generated using the tree item's label. **Note** that when labels change, ids will change and that selection and expansion state cannot be kept stable anymore. - */ - id?: string; - - /** - * The icon path or [ThemeIcon](#ThemeIcon) for the tree item. - * When `falsy`, [Folder Theme Icon](#ThemeIcon.Folder) is assigned, if item is collapsible otherwise [File Theme Icon](#ThemeIcon.File). - * When a [ThemeIcon](#ThemeIcon) is specified, icon is derived from the current file icon theme for the specified theme icon using [resourceUri](#TreeItem.resourceUri) (if provided). - */ - iconPath?: string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon; - - /** - * A human readable string which is rendered less prominent. - * When `true`, it is derived from [resourceUri](#TreeItem.resourceUri) and when `falsy`, it is not shown. - */ - description?: string | boolean; - - /** - * The [uri](#Uri) of the resource representing this item. - * - * Will be used to derive the [label](#TreeItem.label), when it is not provided. - * Will be used to derive the icon from current icon theme, when [iconPath](#TreeItem.iconPath) has [ThemeIcon](#ThemeIcon) value. - */ - resourceUri?: Uri; - - /** - * The tooltip text when you hover over this item. - */ - tooltip?: string | undefined; - - /** - * The [command](#Command) that should be executed when the tree item is selected. - */ - command?: Command; - - /** - * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. - */ - collapsibleState?: TreeItemCollapsibleState; - - /** - * Context value of the tree item. This can be used to contribute item specific actions in the tree. - * For example, a tree item is given a context value as `folder`. When contributing actions to `view/item/context` - * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. - * ``` - * "contributes": { - * "menus": { - * "view/item/context": [ - * { - * "command": "extension.deleteFolder", - * "when": "viewItem == folder" - * } - * ] - * } - * } - * ``` - * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. - */ - contextValue?: string; - - /** - * @param label A human-readable string describing this item - * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) - */ - constructor(label: string, collapsibleState?: TreeItemCollapsibleState); - - /** - * @param resourceUri The [uri](#Uri) of the resource representing this item. - * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) - */ - constructor(resourceUri: Uri, collapsibleState?: TreeItemCollapsibleState); - } - - /** - * Collapsible state of the tree item - */ - export enum TreeItemCollapsibleState { - /** - * Determines an item can be neither collapsed nor expanded. Implies it has no children. - */ - None = 0, - /** - * Determines an item is collapsed - */ - Collapsed = 1, - /** - * Determines an item is expanded - */ - Expanded = 2 - } - - /** - * Value-object describing what options a terminal should use. - */ - export interface TerminalOptions { - /** - * A human-readable string which will be used to represent the terminal in the UI. - */ - name?: string; - - /** - * A path to a custom shell executable to be used in the terminal. - */ - shellPath?: string; - - /** - * Args for the custom shell executable. A string can be used on Windows only which allows - * specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6). - */ - shellArgs?: string[] | string; - - /** - * A path or Uri for the current working directory to be used for the terminal. - */ - cwd?: string | Uri; - - /** - * Object with environment variables that will be added to the VS Code process. - */ - env?: { [key: string]: string | null }; - - /** - * Whether the terminal process environment should be exactly as provided in - * `TerminalOptions.env`. When this is false (default), the environment will be based on the - * window's environment and also apply configured platform settings like - * `terminal.integrated.windows.env` on top. When this is true, the complete environment - * must be provided as nothing will be inherited from the process or any configuration. - */ - strictEnv?: boolean; - - /** - * When enabled the terminal will run the process as normal but not be surfaced to the user - * until `Terminal.show` is called. The typical usage for this is when you need to run - * something that may need interactivity but only want to tell the user about it when - * interaction is needed. Note that the terminals will still be exposed to all extensions - * as normal. - */ - hideFromUser?: boolean; - } - - /** - * Value-object describing what options a virtual process terminal should use. - */ - export interface ExtensionTerminalOptions { - /** - * A human-readable string which will be used to represent the terminal in the UI. - */ - name: string; - - /** - * An implementation of [Pseudoterminal](#Pseudoterminal) that allows an extension to - * control a terminal. - */ - pty: Pseudoterminal; - } - - /** - * Defines the interface of a terminal pty, enabling extensions to control a terminal. - */ - interface Pseudoterminal { - /** - * An event that when fired will write data to the terminal. Unlike - * [Terminal.sendText](#Terminal.sendText) which sends text to the underlying _process_ - * (the pty "slave"), this will write the text to the terminal itself (the pty "master"). - * - * **Example:** Write red text to the terminal - * ```typescript - * const writeEmitter = new vscode.EventEmitter(); - * const pty: vscode.Pseudoterminal = { - * onDidWrite: writeEmitter.event, - * open: () => writeEmitter.fire('\x1b[31mHello world\x1b[0m'), - * close: () => {} - * }; - * vscode.window.createTerminal({ name: 'My terminal', pty }); - * ``` - * - * **Example:** Move the cursor to the 10th row and 20th column and write an asterisk - * ```typescript - * writeEmitter.fire('\x1b[10;20H*'); - * ``` - */ - onDidWrite: Event; - - /** - * An event that when fired allows overriding the [dimensions](#Terminal.dimensions) of the - * terminal. Note that when set, the overridden dimensions will only take effect when they - * are lower than the actual dimensions of the terminal (ie. there will never be a scroll - * bar). Set to `undefined` for the terminal to go back to the regular dimensions (fit to - * the size of the panel). - * - * **Example:** Override the dimensions of a terminal to 20 columns and 10 rows - * ```typescript - * const dimensionsEmitter = new vscode.EventEmitter(); - * const pty: vscode.Pseudoterminal = { - * onDidWrite: writeEmitter.event, - * onDidOverrideDimensions: dimensionsEmitter.event, - * open: () => { - * dimensionsEmitter.fire({ - * columns: 20, - * rows: 10 - * }); - * }, - * close: () => {} - * }; - * vscode.window.createTerminal({ name: 'My terminal', pty }); - * ``` - */ - onDidOverrideDimensions?: Event; - - /** - * An event that when fired will signal that the pty is closed and dispose of the terminal. - * - * A number can be used to provide an exit code for the terminal. Exit codes must be - * positive and a non-zero exit codes signals failure which shows a notification for a - * regular terminal and allows dependent tasks to proceed when used with the - * `CustomExecution2` API. - * - * **Example:** Exit the terminal when "y" is pressed, otherwise show a notification. - * ```typescript - * const writeEmitter = new vscode.EventEmitter(); - * const closeEmitter = new vscode.EventEmitter(); - * const pty: vscode.Pseudoterminal = { - * onDidWrite: writeEmitter.event, - * onDidClose: closeEmitter.event, - * open: () => writeEmitter.fire('Press y to exit successfully'), - * close: () => {}, - * handleInput: data => { - * if (data !== 'y') { - * vscode.window.showInformationMessage('Something went wrong'); - * } - * closeEmitter.fire(); - * } - * }; - * vscode.window.createTerminal({ name: 'Exit example', pty }); - */ - onDidClose?: Event; - - /** - * Implement to handle when the pty is open and ready to start firing events. - * - * @param initialDimensions The dimensions of the terminal, this will be undefined if the - * terminal panel has not been opened before this is called. - */ - open(initialDimensions: TerminalDimensions | undefined): void; - - /** - * Implement to handle when the terminal is closed by an act of the user. - */ - close(): void; - - /** - * Implement to handle incoming keystrokes in the terminal or when an extension calls - * [Terminal.sendText](#Terminal.sendText). `data` contains the keystrokes/text serialized into - * their corresponding VT sequence representation. - * - * @param data The incoming data. - * - * **Example:** Echo input in the terminal. The sequence for enter (`\r`) is translated to - * CRLF to go to a new line and move the cursor to the start of the line. - * ```typescript - * const writeEmitter = new vscode.EventEmitter(); - * const pty: vscode.Pseudoterminal = { - * onDidWrite: writeEmitter.event, - * open: () => {}, - * close: () => {}, - * handleInput: data => writeEmitter.fire(data === '\r' ? '\r\n' : data) - * }; - * vscode.window.createTerminal({ name: 'Local echo', pty }); - * ``` - */ - handleInput?(data: string): void; - - /** - * Implement to handle when the number of rows and columns that fit into the terminal panel - * changes, for example when font size changes or when the panel is resized. The initial - * state of a terminal's dimensions should be treated as `undefined` until this is triggered - * as the size of a terminal isn't know until it shows up in the user interface. - * - * When dimensions are overridden by - * [onDidOverrideDimensions](#Pseudoterminal.onDidOverrideDimensions), `setDimensions` will - * continue to be called with the regular panel dimensions, allowing the extension continue - * to react dimension changes. - * - * @param dimensions The new dimensions. - */ - setDimensions?(dimensions: TerminalDimensions): void; - } - - /** - * Represents the dimensions of a terminal. - */ - export interface TerminalDimensions { - /** - * The number of columns in the terminal. - */ - readonly columns: number; - - /** - * The number of rows in the terminal. - */ - readonly rows: number; - } - - /** - * A location in the editor at which progress information can be shown. It depends on the - * location how progress is visually represented. - */ - export enum ProgressLocation { - - /** - * Show progress for the source control viewlet, as overlay for the icon and as progress bar - * inside the viewlet (when visible). Neither supports cancellation nor discrete progress. - */ - SourceControl = 1, - - /** - * Show progress in the status bar of the editor. Neither supports cancellation nor discrete progress. - */ - Window = 10, - - /** - * Show progress as notification with an optional cancel button. Supports to show infinite and discrete progress. - */ - Notification = 15 - } - - /** - * Value-object describing where and how progress should show. - */ - export interface ProgressOptions { - - /** - * The location at which progress should show. - */ - location: ProgressLocation; - - /** - * A human-readable string which will be used to describe the - * operation. - */ - title?: string; - - /** - * Controls if a cancel button should show to allow the user to - * cancel the long running operation. Note that currently only - * `ProgressLocation.Notification` is supporting to show a cancel - * button. - */ - cancellable?: boolean; - } - - /** - * A light-weight user input UI that is initially not visible. After - * configuring it through its properties the extension can make it - * visible by calling [QuickInput.show](#QuickInput.show). - * - * There are several reasons why this UI might have to be hidden and - * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide). - * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide), - * the user pressing Esc, some other input UI opening, etc.) - * - * A user pressing Enter or some other gesture implying acceptance - * of the current state does not automatically hide this UI component. - * It is up to the extension to decide whether to accept the user's input - * and if the UI should indeed be hidden through a call to [QuickInput.hide](#QuickInput.hide). - * - * When the extension no longer needs this input UI, it should - * [QuickInput.dispose](#QuickInput.dispose) it to allow for freeing up - * any resources associated with it. - * - * See [QuickPick](#QuickPick) and [InputBox](#InputBox) for concrete UIs. - */ - export interface QuickInput { - - /** - * An optional title. - */ - title: string | undefined; - - /** - * An optional current step count. - */ - step: number | undefined; - - /** - * An optional total step count. - */ - totalSteps: number | undefined; - - /** - * If the UI should allow for user input. Defaults to true. - * - * Change this to false, e.g., while validating user input or - * loading data for the next step in user input. - */ - enabled: boolean; - - /** - * If the UI should show a progress indicator. Defaults to false. - * - * Change this to true, e.g., while loading more data or validating - * user input. - */ - busy: boolean; - - /** - * If the UI should stay open even when loosing UI focus. Defaults to false. - */ - ignoreFocusOut: boolean; - - /** - * Makes the input UI visible in its current configuration. Any other input - * UI will first fire an [QuickInput.onDidHide](#QuickInput.onDidHide) event. - */ - show(): void; - - /** - * Hides this input UI. This will also fire an [QuickInput.onDidHide](#QuickInput.onDidHide) - * event. - */ - hide(): void; - - /** - * An event signaling when this input UI is hidden. - * - * There are several reasons why this UI might have to be hidden and - * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide). - * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide), - * the user pressing Esc, some other input UI opening, etc.) - */ - onDidHide: Event; - - /** - * Dispose of this input UI and any associated resources. If it is still - * visible, it is first hidden. After this call the input UI is no longer - * functional and no additional methods or properties on it should be - * accessed. Instead a new input UI should be created. - */ - dispose(): void; - } - - /** - * A concrete [QuickInput](#QuickInput) to let the user pick an item from a - * list of items of type T. The items can be filtered through a filter text field and - * there is an option [canSelectMany](#QuickPick.canSelectMany) to allow for - * selecting multiple items. - * - * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick) - * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used - * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility. - */ - export interface QuickPick extends QuickInput { - - /** - * Current value of the filter text. - */ - value: string; - - /** - * Optional placeholder in the filter text. - */ - placeholder: string | undefined; - - /** - * An event signaling when the value of the filter text has changed. - */ - readonly onDidChangeValue: Event; - - /** - * An event signaling when the user indicated acceptance of the selected item(s). - */ - readonly onDidAccept: Event; - - /** - * Buttons for actions in the UI. - */ - buttons: ReadonlyArray; - - /** - * An event signaling when a button was triggered. - */ - readonly onDidTriggerButton: Event; - - /** - * Items to pick from. - */ - items: ReadonlyArray; - - /** - * If multiple items can be selected at the same time. Defaults to false. - */ - canSelectMany: boolean; - - /** - * If the filter text should also be matched against the description of the items. Defaults to false. - */ - matchOnDescription: boolean; - - /** - * If the filter text should also be matched against the detail of the items. Defaults to false. - */ - matchOnDetail: boolean; - - /** - * Active items. This can be read and updated by the extension. - */ - activeItems: ReadonlyArray; - - /** - * An event signaling when the active items have changed. - */ - readonly onDidChangeActive: Event; - - /** - * Selected items. This can be read and updated by the extension. - */ - selectedItems: ReadonlyArray; - - /** - * An event signaling when the selected items have changed. - */ - readonly onDidChangeSelection: Event; - } - - /** - * A concrete [QuickInput](#QuickInput) to let the user input a text value. - * - * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox) - * is easier to use. [window.createInputBox](#window.createInputBox) should be used - * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility. - */ - export interface InputBox extends QuickInput { - - /** - * Current input value. - */ - value: string; - - /** - * Optional placeholder in the filter text. - */ - placeholder: string | undefined; - - /** - * If the input value should be hidden. Defaults to false. - */ - password: boolean; - - /** - * An event signaling when the value has changed. - */ - readonly onDidChangeValue: Event; - - /** - * An event signaling when the user indicated acceptance of the input value. - */ - readonly onDidAccept: Event; - - /** - * Buttons for actions in the UI. - */ - buttons: ReadonlyArray; - - /** - * An event signaling when a button was triggered. - */ - readonly onDidTriggerButton: Event; - - /** - * An optional prompt text providing some ask or explanation to the user. - */ - prompt: string | undefined; - - /** - * An optional validation message indicating a problem with the current input value. - */ - validationMessage: string | undefined; - } - - /** - * Button for an action in a [QuickPick](#QuickPick) or [InputBox](#InputBox). - */ - export interface QuickInputButton { - - /** - * Icon for the button. - */ - readonly iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon; - - /** - * An optional tooltip. - */ - readonly tooltip?: string | undefined; - } - - /** - * Predefined buttons for [QuickPick](#QuickPick) and [InputBox](#InputBox). - */ - export class QuickInputButtons { - - /** - * A back button for [QuickPick](#QuickPick) and [InputBox](#InputBox). - * - * When a navigation 'back' button is needed this one should be used for consistency. - * It comes with a predefined icon, tooltip and location. - */ - static readonly Back: QuickInputButton; - - /** - * @hidden - */ - private constructor(); - } - - /** - * An event describing an individual change in the text of a [document](#TextDocument). - */ - export interface TextDocumentContentChangeEvent { - /** - * The range that got replaced. - */ - range: Range; - /** - * The offset of the range that got replaced. - */ - rangeOffset: number; - /** - * The length of the range that got replaced. - */ - rangeLength: number; - /** - * The new text for the range. - */ - text: string; - } - - /** - * An event describing a transactional [document](#TextDocument) change. - */ - export interface TextDocumentChangeEvent { - - /** - * The affected document. - */ - readonly document: TextDocument; - - /** - * An array of content changes. - */ - readonly contentChanges: ReadonlyArray; - } - - /** - * Represents reasons why a text document is saved. - */ - export enum TextDocumentSaveReason { - - /** - * Manually triggered, e.g. by the user pressing save, by starting debugging, - * or by an API call. - */ - Manual = 1, - - /** - * Automatic after a delay. - */ - AfterDelay = 2, - - /** - * When the editor lost focus. - */ - FocusOut = 3 - } - - /** - * An event that is fired when a [document](#TextDocument) will be saved. - * - * To make modifications to the document before it is being saved, call the - * [`waitUntil`](#TextDocumentWillSaveEvent.waitUntil)-function with a thenable - * that resolves to an array of [text edits](#TextEdit). - */ - export interface TextDocumentWillSaveEvent { - - /** - * The document that will be saved. - */ - readonly document: TextDocument; - - /** - * The reason why save was triggered. - */ - readonly reason: TextDocumentSaveReason; - - /** - * Allows to pause the event loop and to apply [pre-save-edits](#TextEdit). - * Edits of subsequent calls to this function will be applied in order. The - * edits will be *ignored* if concurrent modifications of the document happened. - * - * *Note:* This function can only be called during event dispatch and not - * in an asynchronous manner: - * - * ```ts - * workspace.onWillSaveTextDocument(event => { - * // async, will *throw* an error - * setTimeout(() => event.waitUntil(promise)); - * - * // sync, OK - * event.waitUntil(promise); - * }) - * ``` - * - * @param thenable A thenable that resolves to [pre-save-edits](#TextEdit). - */ - waitUntil(thenable: Thenable): void; - - /** - * Allows to pause the event loop until the provided thenable resolved. - * - * *Note:* This function can only be called during event dispatch. - * - * @param thenable A thenable that delays saving. - */ - waitUntil(thenable: Thenable): void; - } - - /** - * An event describing a change to the set of [workspace folders](#workspace.workspaceFolders). - */ - export interface WorkspaceFoldersChangeEvent { - /** - * Added workspace folders. - */ - readonly added: ReadonlyArray; - - /** - * Removed workspace folders. - */ - readonly removed: ReadonlyArray; - } - - /** - * A workspace folder is one of potentially many roots opened by the editor. All workspace folders - * are equal which means there is no notion of an active or master workspace folder. - */ - export interface WorkspaceFolder { - - /** - * The associated uri for this workspace folder. - * - * *Note:* The [Uri](#Uri)-type was intentionally chosen such that future releases of the editor can support - * workspace folders that are not stored on the local disk, e.g. `ftp://server/workspaces/foo`. - */ - readonly uri: Uri; - - /** - * The name of this workspace folder. Defaults to - * the basename of its [uri-path](#Uri.path) - */ - readonly name: string; - - /** - * The ordinal number of this workspace folder. - */ - readonly index: number; - } - - /** - * Namespace for dealing with the current workspace. A workspace is the representation - * of the folder that has been opened. There is no workspace when just a file but not a - * folder has been opened. - * - * The workspace offers support for [listening](#workspace.createFileSystemWatcher) to fs - * events and for [finding](#workspace.findFiles) files. Both perform well and run _outside_ - * the editor-process so that they should be always used instead of nodejs-equivalents. - */ - export namespace workspace { - - /** - * A [file system](#FileSystem) instance that allows to interact with local and remote - * files, e.g. `vscode.workspace.fs.readDirectory(someUri)` allows to retrieve all entries - * of a directory or `vscode.workspace.fs.stat(anotherUri)` returns the meta data for a - * file. - */ - export const fs: FileSystem; - - /** - * ~~The folder that is open in the editor. `undefined` when no folder - * has been opened.~~ - * - * @deprecated Use [`workspaceFolders`](#workspace.workspaceFolders) instead. - */ - export const rootPath: string | undefined; - - /** - * List of workspace folders or `undefined` when no folder is open. - * *Note* that the first entry corresponds to the value of `rootPath`. - */ - export const workspaceFolders: WorkspaceFolder[] | undefined; - - /** - * The name of the workspace. `undefined` when no folder - * has been opened. - */ - export const name: string | undefined; - - /** - * The location of the workspace file, for example: - * - * `file:///Users/name/Development/myProject.code-workspace` - * - * or - * - * `untitled:1555503116870` - * - * for a workspace that is untitled and not yet saved. - * - * Depending on the workspace that is opened, the value will be: - * * `undefined` when no workspace or a single folder is opened - * * the path of the workspace file as `Uri` otherwise. if the workspace - * is untitled, the returned URI will use the `untitled:` scheme - * - * The location can e.g. be used with the `vscode.openFolder` command to - * open the workspace again after it has been closed. - * - * **Example:** - * ```typescript - * vscode.commands.executeCommand('vscode.openFolder', uriOfWorkspace); - * ``` - * - * **Note:** it is not advised to use `workspace.workspaceFile` to write - * configuration data into the file. You can use `workspace.getConfiguration().update()` - * for that purpose which will work both when a single folder is opened as - * well as an untitled or saved workspace. - */ - export const workspaceFile: Uri | undefined; - - /** - * An event that is emitted when a workspace folder is added or removed. - */ - export const onDidChangeWorkspaceFolders: Event; - - /** - * Returns the [workspace folder](#WorkspaceFolder) that contains a given uri. - * * returns `undefined` when the given uri doesn't match any workspace folder - * * returns the *input* when the given uri is a workspace folder itself - * - * @param uri An uri. - * @return A workspace folder or `undefined` - */ - export function getWorkspaceFolder(uri: Uri): WorkspaceFolder | undefined; - - /** - * Returns a path that is relative to the workspace folder or folders. - * - * When there are no [workspace folders](#workspace.workspaceFolders) or when the path - * is not contained in them, the input is returned. - * - * @param pathOrUri A path or uri. When a uri is given its [fsPath](#Uri.fsPath) is used. - * @param includeWorkspaceFolder When `true` and when the given path is contained inside a - * workspace folder the name of the workspace is prepended. Defaults to `true` when there are - * multiple workspace folders and `false` otherwise. - * @return A path relative to the root or the input. - */ - export function asRelativePath(pathOrUri: string | Uri, includeWorkspaceFolder?: boolean): string; - - /** - * This method replaces `deleteCount` [workspace folders](#workspace.workspaceFolders) starting at index `start` - * by an optional set of `workspaceFoldersToAdd` on the `vscode.workspace.workspaceFolders` array. This "splice" - * behavior can be used to add, remove and change workspace folders in a single operation. - * - * If the first workspace folder is added, removed or changed, the currently executing extensions (including the - * one that called this method) will be terminated and restarted so that the (deprecated) `rootPath` property is - * updated to point to the first workspace folder. - * - * Use the [`onDidChangeWorkspaceFolders()`](#onDidChangeWorkspaceFolders) event to get notified when the - * workspace folders have been updated. - * - * **Example:** adding a new workspace folder at the end of workspace folders - * ```typescript - * workspace.updateWorkspaceFolders(workspace.workspaceFolders ? workspace.workspaceFolders.length : 0, null, { uri: ...}); - * ``` - * - * **Example:** removing the first workspace folder - * ```typescript - * workspace.updateWorkspaceFolders(0, 1); - * ``` - * - * **Example:** replacing an existing workspace folder with a new one - * ```typescript - * workspace.updateWorkspaceFolders(0, 1, { uri: ...}); - * ``` - * - * It is valid to remove an existing workspace folder and add it again with a different name - * to rename that folder. - * - * **Note:** it is not valid to call [updateWorkspaceFolders()](#updateWorkspaceFolders) multiple times - * without waiting for the [`onDidChangeWorkspaceFolders()`](#onDidChangeWorkspaceFolders) to fire. - * - * @param start the zero-based location in the list of currently opened [workspace folders](#WorkspaceFolder) - * from which to start deleting workspace folders. - * @param deleteCount the optional number of workspace folders to remove. - * @param workspaceFoldersToAdd the optional variable set of workspace folders to add in place of the deleted ones. - * Each workspace is identified with a mandatory URI and an optional name. - * @return true if the operation was successfully started and false otherwise if arguments were used that would result - * in invalid workspace folder state (e.g. 2 folders with the same URI). - */ - export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { uri: Uri, name?: string }[]): boolean; - - /** - * Creates a file system watcher. - * - * A glob pattern that filters the file events on their absolute path must be provided. Optionally, - * flags to ignore certain kinds of events can be provided. To stop listening to events the watcher must be disposed. - * - * *Note* that only files within the current [workspace folders](#workspace.workspaceFolders) can be watched. - * - * @param globPattern A [glob pattern](#GlobPattern) that is applied to the absolute paths of created, changed, - * and deleted files. Use a [relative pattern](#RelativePattern) to limit events to a certain [workspace folder](#WorkspaceFolder). - * @param ignoreCreateEvents Ignore when files have been created. - * @param ignoreChangeEvents Ignore when files have been changed. - * @param ignoreDeleteEvents Ignore when files have been deleted. - * @return A new file system watcher instance. - */ - export function createFileSystemWatcher(globPattern: GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher; - - /** - * Find files across all [workspace folders](#workspace.workspaceFolders) in the workspace. - * - * @sample `findFiles('**​/*.js', '**​/node_modules/**', 10)` - * @param include A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern - * will be matched against the file paths of resulting matches relative to their workspace. Use a [relative pattern](#RelativePattern) - * to restrict the search results to a [workspace folder](#WorkspaceFolder). - * @param exclude A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern - * will be matched against the file paths of resulting matches relative to their workspace. When `undefined` only default excludes will - * apply, when `null` no excludes will apply. - * @param maxResults An upper-bound for the result. - * @param token A token that can be used to signal cancellation to the underlying search engine. - * @return A thenable that resolves to an array of resource identifiers. Will return no results if no - * [workspace folders](#workspace.workspaceFolders) are opened. - */ - export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable; - - /** - * Save all dirty files. - * - * @param includeUntitled Also save files that have been created during this session. - * @return A thenable that resolves when the files have been saved. - */ - export function saveAll(includeUntitled?: boolean): Thenable; - - /** - * Make changes to one or many resources or create, delete, and rename resources as defined by the given - * [workspace edit](#WorkspaceEdit). - * - * All changes of a workspace edit are applied in the same order in which they have been added. If - * multiple textual inserts are made at the same position, these strings appear in the resulting text - * in the order the 'inserts' were made. Invalid sequences like 'delete file a' -> 'insert text in file a' - * cause failure of the operation. - * - * When applying a workspace edit that consists only of text edits an 'all-or-nothing'-strategy is used. - * A workspace edit with resource creations or deletions aborts the operation, e.g. consecutive edits will - * not be attempted, when a single edit fails. - * - * @param edit A workspace edit. - * @return A thenable that resolves when the edit could be applied. - */ - export function applyEdit(edit: WorkspaceEdit): Thenable; - - /** - * All text documents currently known to the system. - */ - export const textDocuments: TextDocument[]; - - /** - * Opens a document. Will return early if this document is already open. Otherwise - * the document is loaded and the [didOpen](#workspace.onDidOpenTextDocument)-event fires. - * - * The document is denoted by an [uri](#Uri). Depending on the [scheme](#Uri.scheme) the - * following rules apply: - * * `file`-scheme: Open a file on disk, will be rejected if the file does not exist or cannot be loaded. - * * `untitled`-scheme: A new file that should be saved on disk, e.g. `untitled:c:\frodo\new.js`. The language - * will be derived from the file name. - * * For all other schemes contributed [text document content providers](#TextDocumentContentProvider) and - * [file system providers](#FileSystemProvider) are consulted. - * - * *Note* that the lifecycle of the returned document is owned by the editor and not by the extension. That means an - * [`onDidClose`](#workspace.onDidCloseTextDocument)-event can occur at any time after opening it. - * - * @param uri Identifies the resource to open. - * @return A promise that resolves to a [document](#TextDocument). - */ - export function openTextDocument(uri: Uri): Thenable; - - /** - * A short-hand for `openTextDocument(Uri.file(fileName))`. - * - * @see [openTextDocument](#openTextDocument) - * @param fileName A name of a file on disk. - * @return A promise that resolves to a [document](#TextDocument). - */ - export function openTextDocument(fileName: string): Thenable; - - /** - * Opens an untitled text document. The editor will prompt the user for a file - * path when the document is to be saved. The `options` parameter allows to - * specify the *language* and/or the *content* of the document. - * - * @param options Options to control how the document will be created. - * @return A promise that resolves to a [document](#TextDocument). - */ - export function openTextDocument(options?: { language?: string; content?: string; }): Thenable; - - /** - * Register a text document content provider. - * - * Only one provider can be registered per scheme. - * - * @param scheme The uri-scheme to register for. - * @param provider A content provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTextDocumentContentProvider(scheme: string, provider: TextDocumentContentProvider): Disposable; - - /** - * An event that is emitted when a [text document](#TextDocument) is opened or when the language id - * of a text document [has been changed](#languages.setTextDocumentLanguage). - * - * To add an event listener when a visible text document is opened, use the [TextEditor](#TextEditor) events in the - * [window](#window) namespace. Note that: - * - * - The event is emitted before the [document](#TextDocument) is updated in the - * [active text editor](#window.activeTextEditor) - * - When a [text document](#TextDocument) is already open (e.g.: open in another [visible text editor](#window.visibleTextEditors)) this event is not emitted - * - */ - export const onDidOpenTextDocument: Event; - - /** - * An event that is emitted when a [text document](#TextDocument) is disposed or when the language id - * of a text document [has been changed](#languages.setTextDocumentLanguage). - * - * To add an event listener when a visible text document is closed, use the [TextEditor](#TextEditor) events in the - * [window](#window) namespace. Note that this event is not emitted when a [TextEditor](#TextEditor) is closed - * but the document remains open in another [visible text editor](#window.visibleTextEditors). - */ - export const onDidCloseTextDocument: Event; - - /** - * An event that is emitted when a [text document](#TextDocument) is changed. This usually happens - * when the [contents](#TextDocument.getText) changes but also when other things like the - * [dirty](#TextDocument.isDirty)-state changes. - */ - export const onDidChangeTextDocument: Event; - - /** - * An event that is emitted when a [text document](#TextDocument) will be saved to disk. - * - * *Note 1:* Subscribers can delay saving by registering asynchronous work. For the sake of data integrity the editor - * might save without firing this event. For instance when shutting down with dirty files. - * - * *Note 2:* Subscribers are called sequentially and they can [delay](#TextDocumentWillSaveEvent.waitUntil) saving - * by registering asynchronous work. Protection against misbehaving listeners is implemented as such: - * * there is an overall time budget that all listeners share and if that is exhausted no further listener is called - * * listeners that take a long time or produce errors frequently will not be called anymore - * - * The current thresholds are 1.5 seconds as overall time budget and a listener can misbehave 3 times before being ignored. - */ - export const onWillSaveTextDocument: Event; - - /** - * An event that is emitted when a [text document](#TextDocument) is saved to disk. - */ - export const onDidSaveTextDocument: Event; - - /** - * Get a workspace configuration object. - * - * When a section-identifier is provided only that part of the configuration - * is returned. Dots in the section-identifier are interpreted as child-access, - * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`. - * - * When a resource is provided, configuration scoped to that resource is returned. - * - * @param section A dot-separated identifier. - * @param resource A resource for which the configuration is asked for - * @return The full configuration or a subset. - */ - export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration; - - /** - * An event that is emitted when the [configuration](#WorkspaceConfiguration) changed. - */ - export const onDidChangeConfiguration: Event; - - /** - * ~~Register a task provider.~~ - * - * @deprecated Use the corresponding function on the `tasks` namespace instead - * - * @param type The task kind type this provider is registered for. - * @param provider A task provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTaskProvider(type: string, provider: TaskProvider): Disposable; - - /** - * Register a filesystem provider for a given scheme, e.g. `ftp`. - * - * There can only be one provider per scheme and an error is being thrown when a scheme - * has been claimed by another provider or when it is reserved. - * - * @param scheme The uri-[scheme](#Uri.scheme) the provider registers for. - * @param provider The filesystem provider. - * @param options Immutable metadata about the provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean }): Disposable; - } - - /** - * An event describing the change in Configuration - */ - export interface ConfigurationChangeEvent { - - /** - * Returns `true` if the given section for the given resource (if provided) is affected. - * - * @param section Configuration name, supports _dotted_ names. - * @param resource A resource Uri. - * @return `true` if the given section for the given resource (if provided) is affected. - */ - affectsConfiguration(section: string, resource?: Uri): boolean; - } - - /** - * Namespace for participating in language-specific editor [features](https://code.visualstudio.com/docs/editor/editingevolved), - * like IntelliSense, code actions, diagnostics etc. - * - * Many programming languages exist and there is huge variety in syntaxes, semantics, and paradigms. Despite that, features - * like automatic word-completion, code navigation, or code checking have become popular across different tools for different - * programming languages. - * - * The editor provides an API that makes it simple to provide such common features by having all UI and actions already in place and - * by allowing you to participate by providing data only. For instance, to contribute a hover all you have to do is provide a function - * that can be called with a [TextDocument](#TextDocument) and a [Position](#Position) returning hover info. The rest, like tracking the - * mouse, positioning the hover, keeping the hover stable etc. is taken care of by the editor. - * - * ```javascript - * languages.registerHoverProvider('javascript', { - * provideHover(document, position, token) { - * return new Hover('I am a hover!'); - * } - * }); - * ``` - * - * Registration is done using a [document selector](#DocumentSelector) which is either a language id, like `javascript` or - * a more complex [filter](#DocumentFilter) like `{ language: 'typescript', scheme: 'file' }`. Matching a document against such - * a selector will result in a [score](#languages.match) that is used to determine if and how a provider shall be used. When - * scores are equal the provider that came last wins. For features that allow full arity, like [hover](#languages.registerHoverProvider), - * the score is only checked to be `>0`, for other features, like [IntelliSense](#languages.registerCompletionItemProvider) the - * score is used for determining the order in which providers are asked to participate. - */ - export namespace languages { - - /** - * Return the identifiers of all known languages. - * @return Promise resolving to an array of identifier strings. - */ - export function getLanguages(): Thenable; - - /** - * Set (and change) the [language](#TextDocument.languageId) that is associated - * with the given document. - * - * *Note* that calling this function will trigger the [`onDidCloseTextDocument`](#workspace.onDidCloseTextDocument) event - * followed by the [`onDidOpenTextDocument`](#workspace.onDidOpenTextDocument) event. - * - * @param document The document which language is to be changed - * @param languageId The new language identifier. - * @returns A thenable that resolves with the updated document. - */ - export function setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable; - - /** - * Compute the match between a document [selector](#DocumentSelector) and a document. Values - * greater than zero mean the selector matches the document. - * - * A match is computed according to these rules: - * 1. When [`DocumentSelector`](#DocumentSelector) is an array, compute the match for each contained `DocumentFilter` or language identifier and take the maximum value. - * 2. A string will be desugared to become the `language`-part of a [`DocumentFilter`](#DocumentFilter), so `"fooLang"` is like `{ language: "fooLang" }`. - * 3. A [`DocumentFilter`](#DocumentFilter) will be matched against the document by comparing its parts with the document. The following rules apply: - * 1. When the `DocumentFilter` is empty (`{}`) the result is `0` - * 2. When `scheme`, `language`, or `pattern` are defined but one doesn’t match, the result is `0` - * 3. Matching against `*` gives a score of `5`, matching via equality or via a glob-pattern gives a score of `10` - * 4. The result is the maximum value of each match - * - * Samples: - * ```js - * // default document from disk (file-scheme) - * doc.uri; //'file:///my/file.js' - * doc.languageId; // 'javascript' - * match('javascript', doc); // 10; - * match({language: 'javascript'}, doc); // 10; - * match({language: 'javascript', scheme: 'file'}, doc); // 10; - * match('*', doc); // 5 - * match('fooLang', doc); // 0 - * match(['fooLang', '*'], doc); // 5 - * - * // virtual document, e.g. from git-index - * doc.uri; // 'git:/my/file.js' - * doc.languageId; // 'javascript' - * match('javascript', doc); // 10; - * match({language: 'javascript', scheme: 'git'}, doc); // 10; - * match('*', doc); // 5 - * ``` - * - * @param selector A document selector. - * @param document A text document. - * @return A number `>0` when the selector matches and `0` when the selector does not match. - */ - export function match(selector: DocumentSelector, document: TextDocument): number; - - /** - * An [event](#Event) which fires when the global set of diagnostics changes. This is - * newly added and removed diagnostics. - */ - export const onDidChangeDiagnostics: Event; - - /** - * Get all diagnostics for a given resource. - * - * @param resource A resource - * @returns An array of [diagnostics](#Diagnostic) objects or an empty array. - */ - export function getDiagnostics(resource: Uri): Diagnostic[]; - - /** - * Get all diagnostics. - * - * @returns An array of uri-diagnostics tuples or an empty array. - */ - export function getDiagnostics(): [Uri, Diagnostic[]][]; - - /** - * Create a diagnostics collection. - * - * @param name The [name](#DiagnosticCollection.name) of the collection. - * @return A new diagnostic collection. - */ - export function createDiagnosticCollection(name?: string): DiagnosticCollection; - - /** - * Register a completion provider. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and groups of equal score are sequentially asked for - * completion items. The process stops when one or many providers of a group return a - * result. A failing provider (rejected promise or exception) will not fail the whole - * operation. - * - * A completion item provider can be associated with a set of `triggerCharacters`. When trigger - * characters are being typed, completions are requested but only from providers that registered - * the typed character. Because of that trigger characters should be different than [word characters](#LanguageConfiguration.wordPattern), - * a common trigger character is `.` to trigger member completions. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A completion provider. - * @param triggerCharacters Trigger completion when the user types one of the characters. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerCompletionItemProvider(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): Disposable; - - /** - * Register a code action provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A code action provider. - * @param metadata Metadata about the kind of code actions the provider providers. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerCodeActionsProvider(selector: DocumentSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): Disposable; - - /** - * Register a code lens provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A code lens provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerCodeLensProvider(selector: DocumentSelector, provider: CodeLensProvider): Disposable; - - /** - * Register a definition provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A definition provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): Disposable; - - /** - * Register an implementation provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider An implementation provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): Disposable; - - /** - * Register a type definition provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A type definition provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable; - - /** - * Register a declaration provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A declaration provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDeclarationProvider(selector: DocumentSelector, provider: DeclarationProvider): Disposable; - - /** - * Register a hover provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A hover provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable; - - /** - * Register a document highlight provider. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and groups sequentially asked for document highlights. - * The process stops when a provider returns a `non-falsy` or `non-failure` result. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A document highlight provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable; - - /** - * Register a document symbol provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A document symbol provider. - * @param metaData metadata about the provider - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider, metaData?: DocumentSymbolProviderMetadata): Disposable; - - /** - * Register a workspace symbol provider. - * - * Multiple providers can be registered. In that case providers are asked in parallel and - * the results are merged. A failing provider (rejected promise or exception) will not cause - * a failure of the whole operation. - * - * @param provider A workspace symbol provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerWorkspaceSymbolProvider(provider: WorkspaceSymbolProvider): Disposable; - - /** - * Register a reference provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A reference provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerReferenceProvider(selector: DocumentSelector, provider: ReferenceProvider): Disposable; - - /** - * Register a rename provider. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and the best-matching provider is used. Failure - * of the selected provider will cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A rename provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerRenameProvider(selector: DocumentSelector, provider: RenameProvider): Disposable; - - /** - * Register a formatting provider for a document. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and the best-matching provider is used. Failure - * of the selected provider will cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A document formatting edit provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable; - - /** - * Register a formatting provider for a document range. - * - * *Note:* A document range provider is also a [document formatter](#DocumentFormattingEditProvider) - * which means there is no need to [register](#languages.registerDocumentFormattingEditProvider) a document - * formatter when also registering a range provider. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and the best-matching provider is used. Failure - * of the selected provider will cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A document range formatting edit provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable; - - /** - * Register a formatting provider that works on type. The provider is active when the user enables the setting `editor.formatOnType`. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and the best-matching provider is used. Failure - * of the selected provider will cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider An on type formatting edit provider. - * @param firstTriggerCharacter A character on which formatting should be triggered, like `}`. - * @param moreTriggerCharacter More trigger characters. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): Disposable; - - /** - * Register a signature help provider. - * - * Multiple providers can be registered for a language. In that case providers are sorted - * by their [score](#languages.match) and called sequentially until a provider returns a - * valid result. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A signature help provider. - * @param triggerCharacters Trigger signature help when the user types one of the characters, like `,` or `(`. - * @param metadata Information about the provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable; - export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, metadata: SignatureHelpProviderMetadata): Disposable; - - /** - * Register a document link provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A document link provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider): Disposable; - - /** - * Register a color provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A color provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable; - - /** - * Register a folding range provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. - * If multiple folding ranges start at the same position, only the range of the first registered provider is used. - * If a folding range overlaps with an other range that has a smaller position, it is also ignored. - * - * A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A folding range provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable; - - /** - * Register a selection range provider. - * - * Multiple providers can be registered for a language. In that case providers are asked in - * parallel and the results are merged. A failing provider (rejected promise or exception) will - * not cause a failure of the whole operation. - * - * @param selector A selector that defines the documents this provider is applicable to. - * @param provider A selection range provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable; - - /** - * Set a [language configuration](#LanguageConfiguration) for a language. - * - * @param language A language identifier like `typescript`. - * @param configuration Language configuration. - * @return A [disposable](#Disposable) that unsets this configuration. - */ - export function setLanguageConfiguration(language: string, configuration: LanguageConfiguration): Disposable; - } - - /** - * Represents the input box in the Source Control viewlet. - */ - export interface SourceControlInputBox { - - /** - * Setter and getter for the contents of the input box. - */ - value: string; - - /** - * A string to show as place holder in the input box to guide the user. - */ - placeholder: string; - } - - interface QuickDiffProvider { - - /** - * Provide a [uri](#Uri) to the original resource of any given resource uri. - * - * @param uri The uri of the resource open in a text editor. - * @param token A cancellation token. - * @return A thenable that resolves to uri of the matching original resource. - */ - provideOriginalResource?(uri: Uri, token: CancellationToken): ProviderResult; - } - - /** - * The theme-aware decorations for a - * [source control resource state](#SourceControlResourceState). - */ - export interface SourceControlResourceThemableDecorations { - - /** - * The icon path for a specific - * [source control resource state](#SourceControlResourceState). - */ - readonly iconPath?: string | Uri; - } - - /** - * The decorations for a [source control resource state](#SourceControlResourceState). - * Can be independently specified for light and dark themes. - */ - export interface SourceControlResourceDecorations extends SourceControlResourceThemableDecorations { - - /** - * Whether the [source control resource state](#SourceControlResourceState) should - * be striked-through in the UI. - */ - readonly strikeThrough?: boolean; - - /** - * Whether the [source control resource state](#SourceControlResourceState) should - * be faded in the UI. - */ - readonly faded?: boolean; - - /** - * The title for a specific - * [source control resource state](#SourceControlResourceState). - */ - readonly tooltip?: string; - - /** - * The light theme decorations. - */ - readonly light?: SourceControlResourceThemableDecorations; - - /** - * The dark theme decorations. - */ - readonly dark?: SourceControlResourceThemableDecorations; - } - - /** - * An source control resource state represents the state of an underlying workspace - * resource within a certain [source control group](#SourceControlResourceGroup). - */ - export interface SourceControlResourceState { - - /** - * The [uri](#Uri) of the underlying resource inside the workspace. - */ - readonly resourceUri: Uri; - - /** - * The [command](#Command) which should be run when the resource - * state is open in the Source Control viewlet. - */ - readonly command?: Command; - - /** - * The [decorations](#SourceControlResourceDecorations) for this source control - * resource state. - */ - readonly decorations?: SourceControlResourceDecorations; - } - - /** - * A source control resource group is a collection of - * [source control resource states](#SourceControlResourceState). - */ - export interface SourceControlResourceGroup { - - /** - * The id of this source control resource group. - */ - readonly id: string; - - /** - * The label of this source control resource group. - */ - label: string; - - /** - * Whether this source control resource group is hidden when it contains - * no [source control resource states](#SourceControlResourceState). - */ - hideWhenEmpty?: boolean; - - /** - * This group's collection of - * [source control resource states](#SourceControlResourceState). - */ - resourceStates: SourceControlResourceState[]; - - /** - * Dispose this source control resource group. - */ - dispose(): void; - } - - /** - * An source control is able to provide [resource states](#SourceControlResourceState) - * to the editor and interact with the editor in several source control related ways. - */ - export interface SourceControl { - - /** - * The id of this source control. - */ - readonly id: string; - - /** - * The human-readable label of this source control. - */ - readonly label: string; - - /** - * The (optional) Uri of the root of this source control. - */ - readonly rootUri: Uri | undefined; - - /** - * The [input box](#SourceControlInputBox) for this source control. - */ - readonly inputBox: SourceControlInputBox; - - /** - * The UI-visible count of [resource states](#SourceControlResourceState) of - * this source control. - * - * Equals to the total number of [resource state](#SourceControlResourceState) - * of this source control, if undefined. - */ - count?: number; - - /** - * An optional [quick diff provider](#QuickDiffProvider). - */ - quickDiffProvider?: QuickDiffProvider; - - /** - * Optional commit template string. - * - * The Source Control viewlet will populate the Source Control - * input with this value when appropriate. - */ - commitTemplate?: string; - - /** - * Optional accept input command. - * - * This command will be invoked when the user accepts the value - * in the Source Control input. - */ - acceptInputCommand?: Command; - - /** - * Optional status bar commands. - * - * These commands will be displayed in the editor's status bar. - */ - statusBarCommands?: Command[]; - - /** - * Create a new [resource group](#SourceControlResourceGroup). - */ - createResourceGroup(id: string, label: string): SourceControlResourceGroup; - - /** - * Dispose this source control. - */ - dispose(): void; - } - - export namespace scm { - - /** - * ~~The [input box](#SourceControlInputBox) for the last source control - * created by the extension.~~ - * - * @deprecated Use SourceControl.inputBox instead - */ - export const inputBox: SourceControlInputBox; - - /** - * Creates a new [source control](#SourceControl) instance. - * - * @param id An `id` for the source control. Something short, e.g.: `git`. - * @param label A human-readable string for the source control. E.g.: `Git`. - * @param rootUri An optional Uri of the root of the source control. E.g.: `Uri.parse(workspaceRoot)`. - * @return An instance of [source control](#SourceControl). - */ - export function createSourceControl(id: string, label: string, rootUri?: Uri): SourceControl; - } - - /** - * Configuration for a debug session. - */ - export interface DebugConfiguration { - /** - * The type of the debug session. - */ - type: string; - - /** - * The name of the debug session. - */ - name: string; - - /** - * The request type of the debug session. - */ - request: string; - - /** - * Additional debug type specific properties. - */ - [key: string]: any; - } - - /** - * A debug session. - */ - export interface DebugSession { - - /** - * The unique ID of this debug session. - */ - readonly id: string; - - /** - * The debug session's type from the [debug configuration](#DebugConfiguration). - */ - readonly type: string; - - /** - * The debug session's name is initially taken from the [debug configuration](#DebugConfiguration). - * Any changes will be properly reflected in the UI. - */ - name: string; - - /** - * The workspace folder of this session or `undefined` for a folderless setup. - */ - readonly workspaceFolder: WorkspaceFolder | undefined; - - /** - * The "resolved" [debug configuration](#DebugConfiguration) of this session. - * "Resolved" means that - * - all variables have been substituted and - * - platform specific attribute sections have been "flattened" for the matching platform and removed for non-matching platforms. - */ - readonly configuration: DebugConfiguration; - - /** - * Send a custom request to the debug adapter. - */ - customRequest(command: string, args?: any): Thenable; - } - - /** - * A custom Debug Adapter Protocol event received from a [debug session](#DebugSession). - */ - export interface DebugSessionCustomEvent { - /** - * The [debug session](#DebugSession) for which the custom event was received. - */ - readonly session: DebugSession; - - /** - * Type of event. - */ - readonly event: string; - - /** - * Event specific information. - */ - readonly body?: any; - } - - /** - * A debug configuration provider allows to add the initial debug configurations to a newly created launch.json - * and to resolve a launch configuration before it is used to start a new debug session. - * A debug configuration provider is registered via #debug.registerDebugConfigurationProvider. - */ - export interface DebugConfigurationProvider { - /** - * Provides initial [debug configuration](#DebugConfiguration). If more than one debug configuration provider is - * registered for the same type, debug configurations are concatenated in arbitrary order. - * - * @param folder The workspace folder for which the configurations are used or `undefined` for a folderless setup. - * @param token A cancellation token. - * @return An array of [debug configurations](#DebugConfiguration). - */ - provideDebugConfigurations?(folder: WorkspaceFolder | undefined, token?: CancellationToken): ProviderResult; - - /** - * Resolves a [debug configuration](#DebugConfiguration) by filling in missing values or by adding/changing/removing attributes. - * If more than one debug configuration provider is registered for the same type, the resolveDebugConfiguration calls are chained - * in arbitrary order and the initial debug configuration is piped through the chain. - * Returning the value 'undefined' prevents the debug session from starting. - * Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead. - * - * @param folder The workspace folder from which the configuration originates from or `undefined` for a folderless setup. - * @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve. - * @param token A cancellation token. - * @return The resolved debug configuration or undefined or null. - */ - resolveDebugConfiguration?(folder: WorkspaceFolder | undefined, debugConfiguration: DebugConfiguration, token?: CancellationToken): ProviderResult; - } - - /** - * Represents a debug adapter executable and optional arguments and runtime options passed to it. - */ - export class DebugAdapterExecutable { - - /** - * Creates a description for a debug adapter based on an executable program. - * - * @param command The command or executable path that implements the debug adapter. - * @param args Optional arguments to be passed to the command or executable. - * @param options Optional options to be used when starting the command or executable. - */ - constructor(command: string, args?: string[], options?: DebugAdapterExecutableOptions); - - /** - * The command or path of the debug adapter executable. - * A command must be either an absolute path of an executable or the name of an command to be looked up via the PATH environment variable. - * The special value 'node' will be mapped to VS Code's built-in Node.js runtime. - */ - readonly command: string; - - /** - * The arguments passed to the debug adapter executable. Defaults to an empty array. - */ - readonly args: string[]; - - /** - * Optional options to be used when the debug adapter is started. - * Defaults to undefined. - */ - readonly options?: DebugAdapterExecutableOptions; - } - - /** - * Options for a debug adapter executable. - */ - export interface DebugAdapterExecutableOptions { - - /** - * The additional environment of the executed program or shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - - /** - * The current working directory for the executed debug adapter. - */ - cwd?: string; - } - - /** - * Represents a debug adapter running as a socket based server. - */ - export class DebugAdapterServer { - - /** - * The port. - */ - readonly port: number; - - /** - * The host. - */ - readonly host?: string; - - /** - * Create a description for a debug adapter running as a socket based server. - */ - constructor(port: number, host?: string); - } - - export type DebugAdapterDescriptor = DebugAdapterExecutable | DebugAdapterServer; - - export interface DebugAdapterDescriptorFactory { - /** - * 'createDebugAdapterDescriptor' is called at the start of a debug session to provide details about the debug adapter to use. - * These details must be returned as objects of type [DebugAdapterDescriptor](#DebugAdapterDescriptor). - * Currently two types of debug adapters are supported: - * - a debug adapter executable is specified as a command path and arguments (see [DebugAdapterExecutable](#DebugAdapterExecutable)), - * - a debug adapter server reachable via a communication port (see [DebugAdapterServer](#DebugAdapterServer)). - * If the method is not implemented the default behavior is this: - * createDebugAdapter(session: DebugSession, executable: DebugAdapterExecutable) { - * if (typeof session.configuration.debugServer === 'number') { - * return new DebugAdapterServer(session.configuration.debugServer); - * } - * return executable; - * } - * @param session The [debug session](#DebugSession) for which the debug adapter will be used. - * @param executable The debug adapter's executable information as specified in the package.json (or undefined if no such information exists). - * @return a [debug adapter descriptor](#DebugAdapterDescriptor) or undefined. - */ - createDebugAdapterDescriptor(session: DebugSession, executable: DebugAdapterExecutable | undefined): ProviderResult; - } - - /** - * A Debug Adapter Tracker is a means to track the communication between VS Code and a Debug Adapter. - */ - export interface DebugAdapterTracker { - /** - * A session with the debug adapter is about to be started. - */ - onWillStartSession?(): void; - /** - * The debug adapter is about to receive a Debug Adapter Protocol message from VS Code. - */ - onWillReceiveMessage?(message: any): void; - /** - * The debug adapter has sent a Debug Adapter Protocol message to VS Code. - */ - onDidSendMessage?(message: any): void; - /** - * The debug adapter session is about to be stopped. - */ - onWillStopSession?(): void; - /** - * An error with the debug adapter has occurred. - */ - onError?(error: Error): void; - /** - * The debug adapter has exited with the given exit code or signal. - */ - onExit?(code: number | undefined, signal: string | undefined): void; - } - - export interface DebugAdapterTrackerFactory { - /** - * The method 'createDebugAdapterTracker' is called at the start of a debug session in order - * to return a "tracker" object that provides read-access to the communication between VS Code and a debug adapter. - * - * @param session The [debug session](#DebugSession) for which the debug adapter tracker will be used. - * @return A [debug adapter tracker](#DebugAdapterTracker) or undefined. - */ - createDebugAdapterTracker(session: DebugSession): ProviderResult; - } - - /** - * Represents the debug console. - */ - export interface DebugConsole { - /** - * Append the given value to the debug console. - * - * @param value A string, falsy values will not be printed. - */ - append(value: string): void; - - /** - * Append the given value and a line feed character - * to the debug console. - * - * @param value A string, falsy values will be printed. - */ - appendLine(value: string): void; - } - - /** - * An event describing the changes to the set of [breakpoints](#Breakpoint). - */ - export interface BreakpointsChangeEvent { - /** - * Added breakpoints. - */ - readonly added: ReadonlyArray; - - /** - * Removed breakpoints. - */ - readonly removed: ReadonlyArray; - - /** - * Changed breakpoints. - */ - readonly changed: ReadonlyArray; - } - - /** - * The base class of all breakpoint types. - */ - export class Breakpoint { - /** - * The unique ID of the breakpoint. - */ - readonly id: string; - /** - * Is breakpoint enabled. - */ - readonly enabled: boolean; - /** - * An optional expression for conditional breakpoints. - */ - readonly condition?: string; - /** - * An optional expression that controls how many hits of the breakpoint are ignored. - */ - readonly hitCondition?: string; - /** - * An optional message that gets logged when this breakpoint is hit. Embedded expressions within {} are interpolated by the debug adapter. - */ - readonly logMessage?: string; - - protected constructor(enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); - } - - /** - * A breakpoint specified by a source location. - */ - export class SourceBreakpoint extends Breakpoint { - /** - * The source and line position of this breakpoint. - */ - readonly location: Location; - - /** - * Create a new breakpoint for a source location. - */ - constructor(location: Location, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); - } - - /** - * A breakpoint specified by a function name. - */ - export class FunctionBreakpoint extends Breakpoint { - /** - * The name of the function to which this breakpoint is attached. - */ - readonly functionName: string; - - /** - * Create a new function breakpoint. - */ - constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); - } - - /** - * Namespace for debug functionality. - */ - export namespace debug { - - /** - * The currently active [debug session](#DebugSession) or `undefined`. The active debug session is the one - * represented by the debug action floating window or the one currently shown in the drop down menu of the debug action floating window. - * If no debug session is active, the value is `undefined`. - */ - export let activeDebugSession: DebugSession | undefined; - - /** - * The currently active [debug console](#DebugConsole). - * If no debug session is active, output sent to the debug console is not shown. - */ - export let activeDebugConsole: DebugConsole; - - /** - * List of breakpoints. - */ - export let breakpoints: Breakpoint[]; - - - /** - * An [event](#Event) which fires when the [active debug session](#debug.activeDebugSession) - * has changed. *Note* that the event also fires when the active debug session changes - * to `undefined`. - */ - export const onDidChangeActiveDebugSession: Event; - - /** - * An [event](#Event) which fires when a new [debug session](#DebugSession) has been started. - */ - export const onDidStartDebugSession: Event; - - /** - * An [event](#Event) which fires when a custom DAP event is received from the [debug session](#DebugSession). - */ - export const onDidReceiveDebugSessionCustomEvent: Event; - - /** - * An [event](#Event) which fires when a [debug session](#DebugSession) has terminated. - */ - export const onDidTerminateDebugSession: Event; - - /** - * An [event](#Event) that is emitted when the set of breakpoints is added, removed, or changed. - */ - export const onDidChangeBreakpoints: Event; - - - /** - * Register a [debug configuration provider](#DebugConfigurationProvider) for a specific debug type. - * More than one provider can be registered for the same type. - * - * @param type The debug type for which the provider is registered. - * @param provider The [debug configuration provider](#DebugConfigurationProvider) to register. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerDebugConfigurationProvider(debugType: string, provider: DebugConfigurationProvider): Disposable; - - /** - * Register a [debug adapter descriptor factory](#DebugAdapterDescriptorFactory) for a specific debug type. - * An extension is only allowed to register a DebugAdapterDescriptorFactory for the debug type(s) defined by the extension. Otherwise an error is thrown. - * Registering more than one DebugAdapterDescriptorFactory for a debug type results in an error. - * - * @param debugType The debug type for which the factory is registered. - * @param factory The [debug adapter descriptor factory](#DebugAdapterDescriptorFactory) to register. - * @return A [disposable](#Disposable) that unregisters this factory when being disposed. - */ - export function registerDebugAdapterDescriptorFactory(debugType: string, factory: DebugAdapterDescriptorFactory): Disposable; - - /** - * Register a debug adapter tracker factory for the given debug type. - * - * @param debugType The debug type for which the factory is registered or '*' for matching all debug types. - * @param factory The [debug adapter tracker factory](#DebugAdapterTrackerFactory) to register. - * @return A [disposable](#Disposable) that unregisters this factory when being disposed. - */ - export function registerDebugAdapterTrackerFactory(debugType: string, factory: DebugAdapterTrackerFactory): Disposable; - - /** - * Start debugging by using either a named launch or named compound configuration, - * or by directly passing a [DebugConfiguration](#DebugConfiguration). - * The named configurations are looked up in '.vscode/launch.json' found in the given folder. - * Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date. - * Folder specific variables used in the configuration (e.g. '${workspaceFolder}') are resolved against the given folder. - * @param folder The [workspace folder](#WorkspaceFolder) for looking up named configurations and resolving variables or `undefined` for a non-folder setup. - * @param nameOrConfiguration Either the name of a debug or compound configuration or a [DebugConfiguration](#DebugConfiguration) object. - * @param parent If specified the newly created debug session is registered as a "child" session of a "parent" debug session. - * @return A thenable that resolves when debugging could be successfully started. - */ - export function startDebugging(folder: WorkspaceFolder | undefined, nameOrConfiguration: string | DebugConfiguration, parentSession?: DebugSession): Thenable; - - /** - * Add breakpoints. - * @param breakpoints The breakpoints to add. - */ - export function addBreakpoints(breakpoints: Breakpoint[]): void; - - /** - * Remove breakpoints. - * @param breakpoints The breakpoints to remove. - */ - export function removeBreakpoints(breakpoints: Breakpoint[]): void; - } - - /** - * Namespace for dealing with installed extensions. Extensions are represented - * by an [extension](#Extension)-interface which enables reflection on them. - * - * Extension writers can provide APIs to other extensions by returning their API public - * surface from the `activate`-call. - * - * ```javascript - * export function activate(context: vscode.ExtensionContext) { - * let api = { - * sum(a, b) { - * return a + b; - * }, - * mul(a, b) { - * return a * b; - * } - * }; - * // 'export' public api-surface - * return api; - * } - * ``` - * When depending on the API of another extension add an `extensionDependency`-entry - * to `package.json`, and use the [getExtension](#extensions.getExtension)-function - * and the [exports](#Extension.exports)-property, like below: - * - * ```javascript - * let mathExt = extensions.getExtension('genius.math'); - * let importedApi = mathExt.exports; - * - * console.log(importedApi.mul(42, 1)); - * ``` - */ - export namespace extensions { - - /** - * Get an extension by its full identifier in the form of: `publisher.name`. - * - * @param extensionId An extension identifier. - * @return An extension or `undefined`. - */ - export function getExtension(extensionId: string): Extension | undefined; - - /** - * Get an extension its full identifier in the form of: `publisher.name`. - * - * @param extensionId An extension identifier. - * @return An extension or `undefined`. - */ - export function getExtension(extensionId: string): Extension | undefined; - - /** - * All extensions currently known to the system. - */ - export const all: ReadonlyArray>; - - /** - * An event which fires when `extensions.all` changes. This can happen when extensions are - * installed, uninstalled, enabled or disabled. - */ - export const onDidChange: Event; - } - - //#region Comments - - /** - * Collapsible state of a [comment thread](#CommentThread) - */ - export enum CommentThreadCollapsibleState { - /** - * Determines an item is collapsed - */ - Collapsed = 0, - - /** - * Determines an item is expanded - */ - Expanded = 1 - } - - /** - * Comment mode of a [comment](#Comment) - */ - export enum CommentMode { - /** - * Displays the comment editor - */ - Editing = 0, - - /** - * Displays the preview of the comment - */ - Preview = 1 - } - - /** - * A collection of [comments](#Comment) representing a conversation at a particular range in a document. - */ - export interface CommentThread { - /** - * The uri of the document the thread has been created on. - */ - readonly uri: Uri; - - /** - * The range the comment thread is located within the document. The thread icon will be shown - * at the first line of the range. - */ - range: Range; - - /** - * The ordered comments of the thread. - */ - comments: ReadonlyArray; - - /** - * Whether the thread should be collapsed or expanded when opening the document. - * Defaults to Collapsed. - */ - collapsibleState: CommentThreadCollapsibleState; - - /** - * Context value of the comment thread. This can be used to contribute thread specific actions. - * For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title` - * using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`. - * ``` - * "contributes": { - * "menus": { - * "comments/commentThread/title": [ - * { - * "command": "extension.deleteCommentThread", - * "when": "commentThread == editable" - * } - * ] - * } - * } - * ``` - * This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`. - */ - contextValue?: string; - - /** - * The optional human-readable label describing the [Comment Thread](#CommentThread) - */ - label?: string; - - /** - * Dispose this comment thread. - * - * Once disposed, this comment thread will be removed from visible editors and Comment Panel when approriate. - */ - dispose(): void; - } - - /** - * Author information of a [comment](#Comment) - */ - export interface CommentAuthorInformation { - /** - * The display name of the author of the comment - */ - name: string; - - /** - * The optional icon path for the author - */ - iconPath?: Uri; - } - - /** - * Reactions of a [comment](#Comment) - */ - export interface CommentReaction { - /** - * The human-readable label for the reaction - */ - readonly label: string; - - /** - * Icon for the reaction shown in UI. - */ - readonly iconPath: string | Uri; - - /** - * The number of users who have reacted to this reaction - */ - readonly count: number; - - /** - * Whether the [author](CommentAuthorInformation) of the comment has reacted to this reaction - */ - readonly authorHasReacted: boolean; - } - - /** - * A comment is displayed within the editor or the Comments Panel, depending on how it is provided. - */ - export interface Comment { - /** - * The human-readable comment body - */ - body: string | MarkdownString; - - /** - * [Comment mode](#CommentMode) of the comment - */ - mode: CommentMode; - - /** - * The [author information](#CommentAuthorInformation) of the comment - */ - author: CommentAuthorInformation; - - /** - * Context value of the comment. This can be used to contribute comment specific actions. - * For example, a comment is given a context value as `editable`. When contributing actions to `comments/comment/title` - * using `menus` extension point, you can specify context value for key `comment` in `when` expression like `comment == editable`. - * ```json - * "contributes": { - * "menus": { - * "comments/comment/title": [ - * { - * "command": "extension.deleteComment", - * "when": "comment == editable" - * } - * ] - * } - * } - * ``` - * This will show action `extension.deleteComment` only for comments with `contextValue` is `editable`. - */ - contextValue?: string; - - /** - * Optional reactions of the [comment](#Comment) - */ - reactions?: CommentReaction[]; - - /** - * Optional label describing the [Comment](#Comment) - * Label will be rendered next to authorName if exists. - */ - label?: string; - } - - /** - * Command argument for actions registered in `comments/commentThread/context`. - */ - export interface CommentReply { - /** - * The active [comment thread](#CommentThread) - */ - thread: CommentThread; - - /** - * The value in the comment editor - */ - text: string; - } - - /** - * Commenting range provider for a [comment controller](#CommentController). - */ - export interface CommentingRangeProvider { - /** - * Provide a list of ranges which allow new comment threads creation or null for a given document - */ - provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult; - } - - /** - * A comment controller is able to provide [comments](#CommentThread) support to the editor and - * provide users various ways to interact with comments. - */ - export interface CommentController { - /** - * The id of this comment controller. - */ - readonly id: string; - - /** - * The human-readable label of this comment controller. - */ - readonly label: string; - - /** - * Optional commenting range provider. Provide a list [ranges](#Range) which support commenting to any given resource uri. - * - * If not provided, users can leave comments in any document opened in the editor. - */ - commentingRangeProvider?: CommentingRangeProvider; - - /** - * Create a [comment thread](#CommentThread). The comment thread will be displayed in visible text editors (if the resource matches) - * and Comments Panel once created. - * - * @param uri The uri of the document the thread has been created on. - * @param range The range the comment thread is located within the document. - * @param comments The ordered comments of the thread. - */ - createCommentThread(uri: Uri, range: Range, comments: Comment[]): CommentThread; - - /** - * Optional reaction handler for creating and deleting reactions on a [comment](#Comment). - */ - reactionHandler?: (comment: Comment, reaction: CommentReaction) => Promise; - - /** - * Dispose this comment controller. - * - * Once disposed, all [comment threads](#CommentThread) created by this comment controller will also be removed from the editor - * and Comments Panel. - */ - dispose(): void; - } - - namespace comments { - /** - * Creates a new [comment controller](#CommentController) instance. - * - * @param id An `id` for the comment controller. - * @param label A human-readable string for the comment controller. - * @return An instance of [comment controller](#CommentController). - */ - export function createCommentController(id: string, label: string): CommentController; - } - - //#endregion -} - -/** - * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, - * and others. This API makes no assumption about what promise library is being used which - * enables reusing existing code without migrating to a specific promise implementation. Still, - * we recommend the use of native promises which are available in this editor. - */ -interface Thenable { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; - then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; -} diff --git a/node_modules/@types/vscode/package.json b/node_modules/@types/vscode/package.json deleted file mode 100644 index b3c4960..0000000 --- a/node_modules/@types/vscode/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "@types/vscode@1.39.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "@types/vscode@1.39.0", - "_id": "@types/vscode@1.39.0", - "_inBundle": false, - "_integrity": "sha512-rlg0okXDt7NjAyHXbZ2nO1I/VY/8y9w67ltLRrOxXQ46ayvrYZavD4A6zpYrGbs2+ZOEQzcUs+QZOqcVGQIxXQ==", - "_location": "/@types/vscode", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/vscode@1.39.0", - "name": "@types/vscode", - "escapedName": "@types%2fvscode", - "scope": "@types", - "rawSpec": "1.39.0", - "saveSpec": null, - "fetchSpec": "1.39.0" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.39.0.tgz", - "_spec": "1.39.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Visual Studio Code Team, Microsoft", - "url": "https://github.com/Microsoft" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for Visual Studio Code", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/vscode", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/vscode" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "types": "index", - "typesPublisherContentHash": "8045793d071f40c79a3e0707d9ecc5a57a194e24f1915f24f95210423139e8d1", - "version": "1.39.0" -} diff --git a/node_modules/agent-base/.travis.yml b/node_modules/agent-base/.travis.yml deleted file mode 100644 index 7620095..0000000 --- a/node_modules/agent-base/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - -install: - - PATH="`npm bin`:`npm bin -g`:$PATH" - # Install dependencies and build - - npm install - -script: - # Output useful info for debugging - - node --version - - npm --version - # Run tests - - npm test diff --git a/node_modules/agent-base/History.md b/node_modules/agent-base/History.md deleted file mode 100644 index 80c88dc..0000000 --- a/node_modules/agent-base/History.md +++ /dev/null @@ -1,113 +0,0 @@ - -4.2.0 / 2018-01-15 -================== - - * Add support for returning an `http.Agent` instance - * Optimize promisifying logic - * Set `timeout` to null for proper cleanup - * Remove Node.js <= 0.11.3 special-casing from test case - -4.1.2 / 2017-11-20 -================== - - * test Node 9 on Travis - * ensure that `https.get()` uses the patched `https.request()` - -4.1.1 / 2017-07-20 -================== - - * Correct `https.request()` with a String (#9) - -4.1.0 / 2017-06-26 -================== - - * mix in Agent options into Request options - * throw when nothing is returned from agent-base callback - * do not modify the options object for https requests - -4.0.1 / 2017-06-13 -================== - - * add `this` context tests and fixes - -4.0.0 / 2017-06-06 -================== - - * drop support for Node.js < 4 - * drop old versions of Node.js from Travis-CI - * specify Node.js >= 4.0.0 in `engines.node` - * remove more old code - * remove "extend" dependency - * remove "semver" dependency - * make the Promise logic a bit cleaner - * add async function pseudo-example to README - * use direct return in README example - -3.0.0 / 2017-06-02 -================== - - * drop support for Node.js v0.8 and v0.10 - * add support for async, Promises, and direct return - * add a couple `options` test cases - * implement a `"timeout"` option - * rename main file to `index.js` - * test Node 8 on Travis - -2.1.1 / 2017-05-30 -================== - - * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) - -2.1.0 / 2017-05-26 -================== - - * unref is not supported for node < 0.9.1 (@pi0) - * add tests to dangling socket (@pi0) - * check unref() is supported (@pi0) - * fix dangling sockets problem (@pi0) - * add basic "ws" module tests - * make `Agent` be subclassable - * turn `addRequest()` into a named function - * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) - * travis: test node v4, v5, v6 and v7 - -2.0.1 / 2015-09-10 -================== - - * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet) - -2.0.0 / 2015-07-10 -================== - - * refactor to patch Node.js core for more consistent `opts` values - * ensure that HTTP(s) default port numbers are always given - * test: use ssl-cert-snakeoil SSL certs - * test: add tests for arbitrary options - * README: add API section - * README: make the Agent HTTP/HTTPS generic in the example - * README: use SVG for Travis-CI badge - -1.0.2 / 2015-06-27 -================== - - * agent: set `req._hadError` to true after emitting "error" - * package: update "mocha" to v2 - * test: add artificial HTTP GET request test - * test: add artificial data events test - * test: fix artifical GET response test on node > v0.11.3 - * test: use a real timeout for the async error test - -1.0.1 / 2013-09-09 -================== - - * Fix passing an "error" object to the callback function on the first tick - -1.0.0 / 2013-09-09 -================== - - * New API: now you pass a callback function directly - -0.0.1 / 2013-07-09 -================== - - * Initial release diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md deleted file mode 100644 index dbeceab..0000000 --- a/node_modules/agent-base/README.md +++ /dev/null @@ -1,145 +0,0 @@ -agent-base -========== -### Turn a function into an [`http.Agent`][http.Agent] instance -[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base) - -This module provides an `http.Agent` generator. That is, you pass it an async -callback function, and it returns a new `http.Agent` instance that will invoke the -given callback function when sending outbound HTTP requests. - -#### Some subclasses: - -Here's some more interesting uses of `agent-base`. -Send a pull request to list yours! - - * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints - * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints - * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install agent-base -``` - - -Example -------- - -Here's a minimal example that creates a new `net.Socket` connection to the server -for every HTTP request (i.e. the equivalent of `agent: false` option): - -```js -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var http = require('http'); -var agent = require('agent-base'); - -var endpoint = 'http://nodejs.org/api/'; -var parsed = url.parse(endpoint); - -// This is the important part! -parsed.agent = agent(function (req, opts) { - var socket; - // `secureEndpoint` is true when using the https module - if (opts.secureEndpoint) { - socket = tls.connect(opts); - } else { - socket = net.connect(opts); - } - return socket; -}); - -// Everything else works just like normal... -http.get(parsed, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -Returning a Promise or using an `async` function is also supported: - -```js -agent(async function (req, opts) { - await sleep(1000); - // etc… -}); -``` - -Return another `http.Agent` instance to "pass through" the responsibility -for that HTTP request to that agent: - -```js -agent(function (req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); -``` - - -API ---- - -## Agent(Function callback[, Object options]) → [http.Agent][] - -Creates a base `http.Agent` that will execute the callback function `callback` -for every HTTP request that it is used as the `agent` for. The callback function -is responsible for creating a `stream.Duplex` instance of some kind that will be -used as the underlying socket in the HTTP request. - -The `options` object accepts the following properties: - - * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). - -The callback function should have the following signature: - -### callback(http.ClientRequest req, Object options, Function cb) → undefined - -The ClientRequest `req` can be accessed to read request headers and -and the path, etc. The `options` object contains the options passed -to the `http.request()`/`https.request()` function call, and is formatted -to be directly passed to `net.connect()`/`tls.connect()`, or however -else you want a Socket to be created. Pass the created socket to -the callback function `cb` once created, and the HTTP request will -continue to proceed. - -If the `https` module is used to invoke the HTTP request, then the -`secureEndpoint` property on `options` _will be set to `true`_. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -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. - -[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent -[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent -[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent -[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent -[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/node_modules/agent-base/index.d.ts b/node_modules/agent-base/index.d.ts deleted file mode 100644 index ff6788b..0000000 --- a/node_modules/agent-base/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Type definitions for agent-base 4.2.1 -// Project: https://github.com/TooTallNate/node-agent-base -// Definitions by: Christopher Quadflieg - -/// -import { EventEmitter } from 'events'; - -declare namespace Agent { - export type AgentCallback = ( - req?: any, - opts?: { - secureEndpoint: boolean; - } - ) => void; - - export interface AgentOptions { - timeout?: number; - host?: string; - port?: number; - [key: string]: any; - } - - export interface Agent extends EventEmitter { - _promisifiedCallback: boolean; - timeout: number | null; - options?: AgentOptions; - callback: AgentCallback; - addRequest: (req?: any, opts?: any) => void; - freeSocket: (socket: any, opts: any) => void; - } -} - -/** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - */ -declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; -declare function Agent( - callback: Agent.AgentCallback, - opts?: Agent.AgentOptions -): Agent.Agent; - -export = Agent; diff --git a/node_modules/agent-base/index.js b/node_modules/agent-base/index.js deleted file mode 100644 index 0ee6b29..0000000 --- a/node_modules/agent-base/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; -require('./patch-core'); -const inherits = require('util').inherits; -const promisify = require('es6-promisify'); -const EventEmitter = require('events').EventEmitter; - -module.exports = Agent; - -function isAgent(v) { - return v && typeof v.addRequest === 'function'; -} - -/** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ -function Agent(callback, _opts) { - if (!(this instanceof Agent)) { - return new Agent(callback, _opts); - } - - EventEmitter.call(this); - - // The callback gets promisified if it has 3 parameters - // (i.e. it has a callback function) lazily - this._promisifiedCallback = false; - - let opts = _opts; - if ('function' === typeof callback) { - this.callback = callback; - } else if (callback) { - opts = callback; - } - - // timeout for the socket to be returned from the callback - this.timeout = (opts && opts.timeout) || null; - - this.options = opts; -} -inherits(Agent, EventEmitter); - -/** - * Override this function in your subclass! - */ -Agent.prototype.callback = function callback(req, opts) { - throw new Error( - '"agent-base" has no default implementation, you must subclass and override `callback()`' - ); -}; - -/** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ -Agent.prototype.addRequest = function addRequest(req, _opts) { - const ownOpts = Object.assign({}, _opts); - - // Set default `host` for HTTP to localhost - if (null == ownOpts.host) { - ownOpts.host = 'localhost'; - } - - // Set default `port` for HTTP if none was explicitly specified - if (null == ownOpts.port) { - ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; - } - - const opts = Object.assign({}, this.options, ownOpts); - - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most likely the - // result of a `url.parse()` call... we need to remove the `path` portion so - // that `net.connect()` doesn't attempt to open that as a unix socket file. - delete opts.path; - } - - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - - // Create the `stream.Duplex` instance - let timeout; - let timedOut = false; - const timeoutMs = this.timeout; - const freeSocket = this.freeSocket; - - function onerror(err) { - if (req._hadError) return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - } - - function ontimeout() { - timeout = null; - timedOut = true; - const err = new Error( - 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms' - ); - err.code = 'ETIMEOUT'; - onerror(err); - } - - function callbackError(err) { - if (timedOut) return; - if (timeout != null) { - clearTimeout(timeout); - timeout = null; - } - onerror(err); - } - - function onsocket(socket) { - if (timedOut) return; - if (timeout != null) { - clearTimeout(timeout); - timeout = null; - } - if (isAgent(socket)) { - // `socket` is actually an http.Agent instance, so relinquish - // responsibility for this `req` to the Agent from here on - socket.addRequest(req, opts); - } else if (socket) { - function onfree() { - freeSocket(socket, opts); - } - socket.on('free', onfree); - req.onSocket(socket); - } else { - const err = new Error( - 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`' - ); - onerror(err); - } - } - - if (!this._promisifiedCallback && this.callback.length >= 3) { - // Legacy callback function - convert to a Promise - this.callback = promisify(this.callback, this); - this._promisifiedCallback = true; - } - - if (timeoutMs > 0) { - timeout = setTimeout(ontimeout, timeoutMs); - } - - try { - Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); - } catch (err) { - Promise.reject(err).catch(callbackError); - } -}; - -Agent.prototype.freeSocket = function freeSocket(socket, opts) { - // TODO reuse sockets - socket.destroy(); -}; diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json deleted file mode 100644 index 77f21d4..0000000 --- a/node_modules/agent-base/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "agent-base@4.3.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "agent-base@4.3.0", - "_id": "agent-base@4.3.0", - "_inBundle": false, - "_integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "_location": "/agent-base", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "agent-base@4.3.0", - "name": "agent-base", - "escapedName": "agent-base", - "rawSpec": "4.3.0", - "saveSpec": null, - "fetchSpec": "4.3.0" - }, - "_requiredBy": [ - "/http-proxy-agent", - "/https-proxy-agent" - ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "_spec": "4.3.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "bugs": { - "url": "https://github.com/TooTallNate/node-agent-base/issues" - }, - "dependencies": { - "es6-promisify": "^5.0.0" - }, - "description": "Turn a function into an `http.Agent` instance", - "devDependencies": { - "@types/es6-promisify": "^5.0.0", - "@types/node": "^10.5.3", - "mocha": "^3.4.2", - "ws": "^3.0.0" - }, - "engines": { - "node": ">= 4.0.0" - }, - "homepage": "https://github.com/TooTallNate/node-agent-base#readme", - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "license": "MIT", - "main": "./index.js", - "name": "agent-base", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-agent-base.git" - }, - "scripts": { - "test": "mocha --reporter spec" - }, - "version": "4.3.0" -} diff --git a/node_modules/agent-base/patch-core.js b/node_modules/agent-base/patch-core.js deleted file mode 100644 index 21cbbb6..0000000 --- a/node_modules/agent-base/patch-core.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const url = require('url'); -const https = require('https'); - -/** - * This currently needs to be applied to all Node.js versions - * in order to determine if the `req` is an HTTP or HTTPS request. - * - * There is currently no PR attempting to move this property upstream. - */ -const patchMarker = "__agent_base_https_request_patched__"; -if (!https.request[patchMarker]) { - https.request = (function(request) { - return function(_options, cb) { - let options; - if (typeof _options === 'string') { - options = url.parse(_options); - } else { - options = Object.assign({}, _options); - } - if (null == options.port) { - options.port = 443; - } - options.secureEndpoint = true; - return request.call(https, options, cb); - }; - })(https.request); - https.request[patchMarker] = true; -} - -/** - * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the - * patched `https.request()`. - * - * Ref: https://github.com/nodejs/node/commit/5118f31 - */ -https.get = function (_url, _options, cb) { - let options; - if (typeof _url === 'string' && _options && typeof _options !== 'function') { - options = Object.assign({}, url.parse(_url), _options); - } else if (!_options && !cb) { - options = _url; - } else if (!cb) { - options = _url; - cb = _options; - } - - const req = https.request(options, cb); - req.end(); - return req; -}; diff --git a/node_modules/agent-base/test/ssl-cert-snakeoil.key b/node_modules/agent-base/test/ssl-cert-snakeoil.key deleted file mode 100644 index fd12501..0000000 --- a/node_modules/agent-base/test/ssl-cert-snakeoil.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr -bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y -b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB -AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd -Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x -1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ -5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW -T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX -uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N -Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw -h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J -bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ -ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== ------END RSA PRIVATE KEY----- diff --git a/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/node_modules/agent-base/test/ssl-cert-snakeoil.pem deleted file mode 100644 index b115a5e..0000000 --- a/node_modules/agent-base/test/ssl-cert-snakeoil.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 -NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 -NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 -NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB -ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay -OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn -g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN -AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 -1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J -QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= ------END CERTIFICATE----- diff --git a/node_modules/agent-base/test/test.js b/node_modules/agent-base/test/test.js deleted file mode 100644 index 0f372c0..0000000 --- a/node_modules/agent-base/test/test.js +++ /dev/null @@ -1,728 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs'); -var url = require('url'); -var net = require('net'); -var tls = require('tls'); -var http = require('http'); -var https = require('https'); -var WebSocket = require('ws'); -var assert = require('assert'); -var events = require('events'); -var inherits = require('util').inherits; -var Agent = require('../'); - -var PassthroughAgent = Agent(function(req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); - -describe('Agent', function() { - describe('subclass', function() { - it('should be subclassable', function(done) { - function MyAgent() { - Agent.call(this); - } - inherits(MyAgent, Agent); - - MyAgent.prototype.callback = function(req, opts, fn) { - assert.equal(req.path, '/foo'); - assert.equal(req.getHeader('host'), '127.0.0.1:1234'); - assert.equal(opts.secureEndpoint, true); - done(); - }; - - var info = url.parse('https://127.0.0.1:1234/foo'); - info.agent = new MyAgent(); - https.get(info); - }); - }); - describe('options', function() { - it('should support an options Object as first argument', function() { - var agent = new Agent({ timeout: 1000 }); - assert.equal(1000, agent.timeout); - }); - it('should support an options Object as second argument', function() { - var agent = new Agent(function() {}, { timeout: 1000 }); - assert.equal(1000, agent.timeout); - }); - it('should be mixed in with HTTP request options', function(done) { - var agent = new Agent({ - host: 'my-proxy.com', - port: 3128, - foo: 'bar' - }); - agent.callback = function(req, opts, fn) { - assert.equal('bar', opts.foo); - assert.equal('a', opts.b); - - // `host` and `port` are special-cases, and should always be - // overwritten in the request `opts` inside the agent-base callback - assert.equal('localhost', opts.host); - assert.equal(80, opts.port); - done(); - }; - var opts = { - b: 'a', - agent: agent - }; - http.get(opts); - }); - }); - describe('`this` context', function() { - it('should be the Agent instance', function(done) { - var called = false; - var agent = new Agent(); - agent.callback = function() { - called = true; - assert.equal(this, agent); - }; - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert(/no Duplex stream was returned/.test(err.message)); - done(); - }); - }); - it('should be the Agent instance with callback signature', function(done) { - var called = false; - var agent = new Agent(); - agent.callback = function(req, opts, fn) { - called = true; - assert.equal(this, agent); - fn(); - }; - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert(/no Duplex stream was returned/.test(err.message)); - done(); - }); - }); - }); - describe('"error" event', function() { - it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function( - done - ) { - var agent = new Agent(); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal( - '"agent-base" has no default implementation, you must subclass and override `callback()`', - err.message - ); - done(); - }); - }); - it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function( - done - ) { - var agent = new Agent(function(req, opts, fn) { - fn(new Error('is this caught?')); - }); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal('is this caught?', err.message); - done(); - }); - }); - it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function( - done - ) { - var agent = new Agent(function(req, opts, fn) { - setTimeout(function() { - fn(new Error('is this caught?')); - }, 10); - }); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal('is this caught?', err.message); - done(); - }); - }); - }); - describe('artificial "streams"', function() { - it('should send a GET request', function(done) { - var stream = new events.EventEmitter(); - - // needed for the `http` module to call .write() on the stream - stream.writable = true; - - stream.write = function(str) { - assert(0 == str.indexOf('GET / HTTP/1.1')); - done(); - }; - - // needed for `http` module in Node.js 4 - stream.cork = function() {}; - - var opts = { - method: 'GET', - host: '127.0.0.1', - path: '/', - port: 80, - agent: new Agent(function(req, opts, fn) { - fn(null, stream); - }) - }; - var req = http.request(opts); - req.end(); - }); - it('should receive a GET response', function(done) { - var stream = new events.EventEmitter(); - var opts = { - method: 'GET', - host: '127.0.0.1', - path: '/', - port: 80, - agent: new Agent(function(req, opts, fn) { - fn(null, stream); - }) - }; - var req = http.request(opts, function(res) { - assert.equal('1.0', res.httpVersion); - assert.equal(200, res.statusCode); - assert.equal('bar', res.headers.foo); - assert.deepEqual(['1', '2'], res.headers['set-cookie']); - done(); - }); - - // have to wait for the "socket" event since `http.ClientRequest` - // doesn't *actually* attach the listeners to the "stream" until - // this happens - req.once('socket', function() { - var buf = Buffer.from( - 'HTTP/1.0 200\r\n' + - 'Foo: bar\r\n' + - 'Set-Cookie: 1\r\n' + - 'Set-Cookie: 2\r\n\r\n' - ); - stream.emit('data', buf); - }); - - req.end(); - }); - }); -}); - -describe('"http" module', function() { - var server; - var port; - - // setup test HTTP server - before(function(done) { - server = http.createServer(); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for basic HTTP requests', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should support direct return in `connect()`', function(done) { - var called = false; - var agent = new Agent(function(req, opts) { - called = true; - return net.connect(opts); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should support returning a Promise in `connect()`', function(done) { - var called = false; - var agent = new Agent(function(req, opts) { - return new Promise(function(resolve, reject) { - called = true; - resolve(net.connect(opts)); - }); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should set the `Connection: close` response header', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Url', req.url); - assert.equal('close', req.headers.connection); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/bar'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('/bar', res.headers['x-url']); - assert.equal('close', res.headers.connection); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should pass through options from `http.request()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('bar', opts.foo); - done(); - }); - - http.get({ - host: 'google.com', - foo: 'bar', - agent: agent - }); - }); - - it('should default to port 80', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal(80, opts.port); - done(); - }); - - // (probably) not hitting a real HTTP server here, - // so no need to add a httpServer request listener - http.get({ - host: '127.0.0.1', - path: '/foo', - agent: agent - }); - }); - - it('should support the "timeout" option', function(done) { - // ensure we timeout after the "error" event had a chance to trigger - this.timeout(1000); - this.slow(800); - - var agent = new Agent( - function(req, opts, fn) { - // this function will time out - }, - { timeout: 100 } - ); - - var opts = url.parse('http://nodejs.org'); - opts.agent = agent; - - var req = http.get(opts); - req.once('error', function(err) { - assert.equal('ETIMEOUT', err.code); - req.abort(); - done(); - }); - }); - - it('should free sockets after use', function(done) { - var agent = new Agent(function(req, opts, fn) { - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - res.socket.emit('free'); - assert.equal(true, res.socket.destroyed); - assert(gotReq); - done(); - }); - }); - - - describe('PassthroughAgent', function() { - it('should pass through to `http.globalAgent`', function(done) { - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = PassthroughAgent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - done(); - }); - }); - }); -}); - -describe('"https" module', function() { - var server; - var port; - - // setup test HTTPS server - before(function(done) { - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - server = https.createServer(options); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should not modify the passed in Options object', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - assert.equal(true, opts.secureEndpoint); - assert.equal(443, opts.port); - assert.equal('localhost', opts.host); - }); - var opts = { agent: agent }; - var req = https.request(opts); - assert.equal(true, called); - assert.equal(false, 'secureEndpoint' in opts); - assert.equal(false, 'port' in opts); - done(); - }); - - it('should work with a String URL', function(done) { - var endpoint = 'https://127.0.0.1:' + port; - var req = https.get(endpoint); - - // it's gonna error out since `rejectUnauthorized` is not being passed in - req.on('error', function(err) { - assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); - done(); - }); - }); - - it('should work for basic HTTPS requests', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - assert(opts.secureEndpoint); - var socket = tls.connect(opts); - fn(null, socket); - }); - - // add HTTPS server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('https://127.0.0.1:' + port + '/foo'); - info.agent = agent; - info.rejectUnauthorized = false; - https.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should pass through options from `https.request()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('bar', opts.foo); - done(); - }); - - https.get({ - host: 'google.com', - foo: 'bar', - agent: agent - }); - }); - - it('should support the 3-argument `https.get()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('/q', opts.pathname || opts.path); - assert.equal('881', opts.port); - assert.equal('bar', opts.foo); - done(); - }); - - https.get( - 'https://google.com:881/q', - { - host: 'google.com', - foo: 'bar', - agent: agent - } - ); - }); - - it('should default to port 443', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal(true, opts.secureEndpoint); - assert.equal(false, opts.rejectUnauthorized); - assert.equal(443, opts.port); - done(); - }); - - // (probably) not hitting a real HTTPS server here, - // so no need to add a httpsServer request listener - https.get({ - host: '127.0.0.1', - path: '/foo', - agent: agent, - rejectUnauthorized: false - }); - }); - - it('should not re-patch https.request', () => { - var patchModulePath = "../patch-core"; - var patchedRequest = https.request; - - delete require.cache[require.resolve(patchModulePath)]; - require(patchModulePath); - - assert.equal(patchedRequest, https.request); - assert.equal(true, https.request.__agent_base_https_request_patched__); - }); - - describe('PassthroughAgent', function() { - it('should pass through to `https.globalAgent`', function(done) { - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('https://127.0.0.1:' + port + '/foo'); - info.agent = PassthroughAgent; - info.rejectUnauthorized = false; - https.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - done(); - }); - }); - }); -}); - -describe('"ws" server', function() { - var wss; - var server; - var port; - - // setup test HTTP server - before(function(done) { - server = http.createServer(); - wss = new WebSocket.Server({ server: server }); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for basic WebSocket connections', function(done) { - function onconnection(ws) { - ws.on('message', function(data) { - assert.equal('ping', data); - ws.send('pong'); - }); - } - wss.on('connection', onconnection); - - var agent = new Agent(function(req, opts, fn) { - var socket = net.connect(opts); - fn(null, socket); - }); - - var client = new WebSocket('ws://127.0.0.1:' + port + '/', { - agent: agent - }); - - client.on('open', function() { - client.send('ping'); - }); - - client.on('message', function(data) { - assert.equal('pong', data); - client.close(); - wss.removeListener('connection', onconnection); - done(); - }); - }); -}); - -describe('"wss" server', function() { - var wss; - var server; - var port; - - // setup test HTTP server - before(function(done) { - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - server = https.createServer(options); - wss = new WebSocket.Server({ server: server }); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for secure WebSocket connections', function(done) { - function onconnection(ws) { - ws.on('message', function(data) { - assert.equal('ping', data); - ws.send('pong'); - }); - } - wss.on('connection', onconnection); - - var agent = new Agent(function(req, opts, fn) { - var socket = tls.connect(opts); - fn(null, socket); - }); - - var client = new WebSocket('wss://127.0.0.1:' + port + '/', { - agent: agent, - rejectUnauthorized: false - }); - - client.on('open', function() { - client.send('ping'); - }); - - client.on('message', function(data) { - assert.equal('pong', data); - client.close(); - wss.removeListener('connection', onconnection); - done(); - }); - }); -}); diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/ansi-colors/LICENSE deleted file mode 100644 index 8749cc7..0000000 --- a/node_modules/ansi-colors/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-present, Brian Woodward. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md deleted file mode 100644 index 4991677..0000000 --- a/node_modules/ansi-colors/README.md +++ /dev/null @@ -1,274 +0,0 @@ -# ansi-colors [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/ansi-colors.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/ansi-colors) - -> Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). - -Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save ansi-colors -``` - -![image](https://user-images.githubusercontent.com/383994/39635445-8a98a3a6-4f8b-11e8-89c1-068c45d4fff8.png) - -## Why use this? - -ansi-colors is _the fastest Node.js library for terminal styling_. A more performant drop-in replacement for chalk, with no dependencies. - -* _Blazing fast_ - Fastest terminal styling library in node.js, 10-20x faster than chalk! - -* _Drop-in replacement_ for [chalk](https://github.com/chalk/chalk). -* _No dependencies_ (Chalk has 7 dependencies in its tree!) - -* _Safe_ - Does not modify the `String.prototype` like [colors](https://github.com/Marak/colors.js). -* Supports [nested colors](#nested-colors), **and does not have the [nested styling bug](#nested-styling-bug) that is present in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur)**. -* Supports [chained colors](#chained-colors). -* [Toggle color support](#toggle-color-support) on or off. - -## Usage - -```js -const c = require('ansi-colors'); - -console.log(c.red('This is a red string!')); -console.log(c.green('This is a red string!')); -console.log(c.cyan('This is a cyan string!')); -console.log(c.yellow('This is a yellow string!')); -``` - -![image](https://user-images.githubusercontent.com/383994/39653848-a38e67da-4fc0-11e8-89ae-98c65ebe9dcf.png) - -## Chained colors - -```js -console.log(c.bold.red('this is a bold red message')); -console.log(c.bold.yellow.italic('this is a bold yellow italicized message')); -console.log(c.green.bold.underline('this is a bold green underlined message')); -``` - -![image](https://user-images.githubusercontent.com/383994/39635780-7617246a-4f8c-11e8-89e9-05216cc54e38.png) - -## Nested colors - -```js -console.log(c.yellow(`foo ${c.red.bold('red')} bar ${c.cyan('cyan')} baz`)); -``` - -![image](https://user-images.githubusercontent.com/383994/39635817-8ed93d44-4f8c-11e8-8afd-8c3ea35f5fbe.png) - -### Nested styling bug - -`ansi-colors` does not have the nested styling bug found in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur). - -```js -const { bold, red } = require('ansi-styles'); -console.log(bold(`foo ${red.dim('bar')} baz`)); - -const colorette = require('colorette'); -console.log(colorette.bold(`foo ${colorette.red(colorette.dim('bar'))} baz`)); - -const kleur = require('kleur'); -console.log(kleur.bold(`foo ${kleur.red.dim('bar')} baz`)); - -const chalk = require('chalk'); -console.log(chalk.bold(`foo ${chalk.red.dim('bar')} baz`)); -``` - -**Results in the following** - -(sans icons and labels) - -![image](https://user-images.githubusercontent.com/383994/47280326-d2ee0580-d5a3-11e8-9611-ea6010f0a253.png) - -## Toggle color support - -Easily enable/disable colors. - -```js -const c = require('ansi-colors'); - -// disable colors manually -c.enabled = false; - -// or use a library to automatically detect support -c.enabled = require('color-support').hasBasic; - -console.log(c.red('I will only be colored red if the terminal supports colors')); -``` - -## Strip ANSI codes - -Use the `.unstyle` method to strip ANSI codes from a string. - -```js -console.log(c.unstyle(c.blue.bold('foo bar baz'))); -//=> 'foo bar baz' -``` - -## Available styles - -**Note** that bright and bright-background colors are not always supported. - -| Colors | Background Colors | Bright Colors | Bright Background Colors | -| ------- | ----------------- | ------------- | ------------------------ | -| black | bgBlack | blackBright | bgBlackBright | -| red | bgRed | redBright | bgRedBright | -| green | bgGreen | greenBright | bgGreenBright | -| yellow | bgYellow | yellowBright | bgYellowBright | -| blue | bgBlue | blueBright | bgBlueBright | -| magenta | bgMagenta | magentaBright | bgMagentaBright | -| cyan | bgCyan | cyanBright | bgCyanBright | -| white | bgWhite | whiteBright | bgWhiteBright | -| gray | | | | -| grey | | | | - -_(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U.K.)_ - -### Style modifiers - -* dim -* **bold** - -* hidden -* _italic_ - -* underline -* inverse -* ~~strikethrough~~ - -* reset - -## Performance - -**Libraries tested** - -* ansi-colors v3.0.4 -* chalk v2.4.1 - -### Mac - -> MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB. - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.915ms` -* chalk - `12.437ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 173,851 ops/sec ±0.42% (91 runs sampled) - chalk x 9,944 ops/sec ±2.53% (81 runs sampled))) - -# Chained colors - ansi-colors x 20,791 ops/sec ±0.60% (88 runs sampled) - chalk x 2,111 ops/sec ±2.34% (83 runs sampled) - -# Nested colors - ansi-colors x 59,304 ops/sec ±0.98% (92 runs sampled) - chalk x 4,590 ops/sec ±2.08% (82 runs sampled) -``` - -### Windows - -> Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.494ms` -* chalk - `11.523ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 193,088 ops/sec ±0.51% (95 runs sampled)) - chalk x 9,612 ops/sec ±3.31% (77 runs sampled))) - -# Chained colors - ansi-colors x 26,093 ops/sec ±1.13% (94 runs sampled) - chalk x 2,267 ops/sec ±2.88% (80 runs sampled)) - -# Nested colors - ansi-colors x 67,747 ops/sec ±0.49% (93 runs sampled) - chalk x 4,446 ops/sec ±3.01% (82 runs sampled)) -``` - -## 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: - -* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") -* [strip-color](https://www.npmjs.com/package/strip-color): Strip ANSI color codes from a string. No dependencies. | [homepage](https://github.com/jonschlinkert/strip-color "Strip ANSI color codes from a string. No dependencies.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 38 | [jonschlinkert](https://github.com/jonschlinkert) | -| 38 | [doowb](https://github.com/doowb) | -| 6 | [lukeed](https://github.com/lukeed) | -| 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | -| 1 | [dwieeb](https://github.com/dwieeb) | -| 1 | [jorgebucaran](https://github.com/jorgebucaran) | -| 1 | [madhavarshney](https://github.com/madhavarshney) | -| 1 | [Weishi93](https://github.com/Weishi93) | -| 1 | [chapterjason](https://github.com/chapterjason) | - -### Author - -**Brian Woodward** - -* [GitHub Profile](https://github.com/doowb) -* [Twitter Profile](https://twitter.com/doowb) -* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) - -### License - -Copyright © 2018, [Brian Woodward](https://github.com/doowb). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on December 03, 2018._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js deleted file mode 100644 index 4e8ed08..0000000 --- a/node_modules/ansi-colors/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -const colors = { enabled: true, visible: true, styles: {}, keys: {} }; - -if ('FORCE_COLOR' in process.env) { - colors.enabled = process.env.FORCE_COLOR !== '0'; -} - -const ansi = style => { - style.open = `\u001b[${style.codes[0]}m`; - style.close = `\u001b[${style.codes[1]}m`; - style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); - return style; -}; - -const wrap = (style, str, nl) => { - let { open, close, regex } = style; - str = open + (str.includes(close) ? str.replace(regex, close + open) : str) + close; - // see https://github.com/chalk/chalk/pull/92, thanks to the - // chalk contributors for this fix. However, we've confirmed that - // this issue is also present in Windows terminals - return nl ? str.replace(/\r?\n/g, `${close}$&${open}`) : str; -}; - -const style = (input, stack) => { - if (input === '' || input == null) return ''; - if (colors.enabled === false) return input; - if (colors.visible === false) return ''; - let str = '' + input; - let nl = str.includes('\n'); - let n = stack.length; - while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); - return str; -}; - -const define = (name, codes, type) => { - colors.styles[name] = ansi({ name, codes }); - let t = colors.keys[type] || (colors.keys[type] = []); - t.push(name); - - Reflect.defineProperty(colors, name, { - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(name) : [name]; - return color; - } - }); -}; - -define('reset', [0, 0], 'modifier'); -define('bold', [1, 22], 'modifier'); -define('dim', [2, 22], 'modifier'); -define('italic', [3, 23], 'modifier'); -define('underline', [4, 24], 'modifier'); -define('inverse', [7, 27], 'modifier'); -define('hidden', [8, 28], 'modifier'); -define('strikethrough', [9, 29], 'modifier'); - -define('black', [30, 39], 'color'); -define('red', [31, 39], 'color'); -define('green', [32, 39], 'color'); -define('yellow', [33, 39], 'color'); -define('blue', [34, 39], 'color'); -define('magenta', [35, 39], 'color'); -define('cyan', [36, 39], 'color'); -define('white', [37, 39], 'color'); -define('gray', [90, 39], 'color'); -define('grey', [90, 39], 'color'); - -define('bgBlack', [40, 49], 'bg'); -define('bgRed', [41, 49], 'bg'); -define('bgGreen', [42, 49], 'bg'); -define('bgYellow', [43, 49], 'bg'); -define('bgBlue', [44, 49], 'bg'); -define('bgMagenta', [45, 49], 'bg'); -define('bgCyan', [46, 49], 'bg'); -define('bgWhite', [47, 49], 'bg'); - -define('blackBright', [90, 39], 'bright'); -define('redBright', [91, 39], 'bright'); -define('greenBright', [92, 39], 'bright'); -define('yellowBright', [93, 39], 'bright'); -define('blueBright', [94, 39], 'bright'); -define('magentaBright', [95, 39], 'bright'); -define('cyanBright', [96, 39], 'bright'); -define('whiteBright', [97, 39], 'bright'); - -define('bgBlackBright', [100, 49], 'bgBright'); -define('bgRedBright', [101, 49], 'bgBright'); -define('bgGreenBright', [102, 49], 'bgBright'); -define('bgYellowBright', [103, 49], 'bgBright'); -define('bgBlueBright', [104, 49], 'bgBright'); -define('bgMagentaBright', [105, 49], 'bgBright'); -define('bgCyanBright', [106, 49], 'bgBright'); -define('bgWhiteBright', [107, 49], 'bgBright'); - -/* eslint-disable no-control-regex */ -const re = colors.ansiRegex = /\u001b\[\d+m/gm; -colors.hasColor = colors.hasAnsi = str => { - re.lastIndex = 0; - return !!str && typeof str === 'string' && re.test(str); -}; - -colors.unstyle = str => { - re.lastIndex = 0; - return typeof str === 'string' ? str.replace(re, '') : str; -}; - -colors.none = colors.clear = colors.noop = str => str; // no-op, for programmatic usage -colors.stripColor = colors.unstyle; -colors.symbols = require('./symbols'); -colors.define = define; -module.exports = colors; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json deleted file mode 100644 index 3bdb8ed..0000000 --- a/node_modules/ansi-colors/package.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "_args": [ - [ - "ansi-colors@3.2.3", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "ansi-colors@3.2.3", - "_id": "ansi-colors@3.2.3", - "_inBundle": false, - "_integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "_location": "/ansi-colors", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-colors@3.2.3", - "name": "ansi-colors", - "escapedName": "ansi-colors", - "rawSpec": "3.2.3", - "saveSpec": null, - "fetchSpec": "3.2.3" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "_spec": "3.2.3", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, - "bugs": { - "url": "https://github.com/doowb/ansi-colors/issues" - }, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jason Schilling", - "url": "https://sourecode.de" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Jordan", - "url": "https://github.com/Silic0nS0ldier" - } - ], - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "devDependencies": { - "decache": "^4.4.0", - "gulp-format-md": "^1.0.0", - "justified": "^1.0.1", - "mocha": "^5.2.0", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "symbols.js", - "types/index.d.ts" - ], - "homepage": "https://github.com/doowb/ansi-colors", - "keywords": [ - "ansi", - "bgblack", - "bgBlack", - "bgblue", - "bgBlue", - "bgcyan", - "bgCyan", - "bggreen", - "bgGreen", - "bgmagenta", - "bgMagenta", - "bgred", - "bgRed", - "bgwhite", - "bgWhite", - "bgyellow", - "bgYellow", - "black", - "blue", - "bold", - "clorox", - "colors", - "cyan", - "dim", - "gray", - "green", - "grey", - "hidden", - "inverse", - "italic", - "kleur", - "magenta", - "red", - "reset", - "strikethrough", - "underline", - "white", - "yellow" - ], - "license": "MIT", - "main": "index.js", - "name": "ansi-colors", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/ansi-colors.git" - }, - "scripts": { - "test": "mocha" - }, - "types": "./types/index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "data": { - "author": { - "linkedin": "woodwardbrian", - "twitter": "doowb" - } - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "ansi-wrap", - "strip-color" - ] - }, - "reflinks": [ - "chalk", - "colorette", - "colors", - "kleur" - ] - }, - "version": "3.2.3" -} diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js deleted file mode 100644 index 9643d8d..0000000 --- a/node_modules/ansi-colors/symbols.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const isWindows = process.platform === 'win32'; -const isLinux = process.platform === 'linux'; - -const windows = { - bullet: '•', - check: '√', - cross: '×', - ellipsis: '...', - heart: '❤', - info: 'i', - line: '─', - middot: '·', - minus: '-', - plus: '+', - question: '?', - questionSmall: '﹖', - pointer: '>', - pointerSmall: '»', - warning: '‼' -}; - -const other = { - ballotCross: '✘', - bullet: '•', - check: '✔', - cross: '✖', - ellipsis: '…', - heart: '❤', - info: 'ℹ', - line: '─', - middot: '·', - minus: '-', - plus: '+', - question: '?', - questionFull: '?', - questionSmall: '﹖', - pointer: isLinux ? '▸' : '❯', - pointerSmall: isLinux ? '‣' : '›', - warning: '⚠' -}; - -module.exports = isWindows ? windows : other; -Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); -Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts deleted file mode 100644 index ca2d24a..0000000 --- a/node_modules/ansi-colors/types/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// Imported from DefinitelyTyped project. -// TypeScript definitions for ansi-colors -// Definitions by: Rogier Schouten -// Integrated by: Jordan Mele - -interface SymbolsType { - check: string; - cross: string; - info: string; - line: string; - pointer: string; - pointerSmall: string; - question: string; - warning: string; -} - -type StyleArrayStructure = [number, number]; -interface StyleArrayProperties { - open: string; - close: string; - closeRe: string; -} - -type StyleType = StyleArrayStructure & StyleArrayProperties; - -export interface StyleFunction extends StylesType { - (s: string): string; -} - -interface StylesType { - // modifiers - reset: T; - bold: T; - dim: T; - italic: T; - underline: T; - inverse: T; - hidden: T; - strikethrough: T; - - // colors - black: T; - red: T; - green: T; - yellow: T; - blue: T; - magenta: T; - cyan: T; - white: T; - gray: T; - grey: T; - - // bright colors - blackBright: T; - redBright: T; - greenBright: T; - yellowBright: T; - blueBright: T; - magentaBright: T; - cyanBright: T; - whiteBright: T; - - // background colors - bgBlack: T; - bgRed: T; - bgGreen: T; - bgYellow: T; - bgBlue: T; - bgMagenta: T; - bgCyan: T; - bgWhite: T; - - // bright background colors - bgBlackBright: T; - bgRedBright: T; - bgGreenBright: T; - bgYellowBright: T; - bgBlueBright: T; - bgMagentaBright: T; - bgCyanBright: T; - bgWhiteBright: T; -} - -// modifiers -export const reset: StyleFunction; -export const bold: StyleFunction; -export const dim: StyleFunction; -export const italic: StyleFunction; -export const underline: StyleFunction; -export const inverse: StyleFunction; -export const hidden: StyleFunction; -export const strikethrough: StyleFunction; - -// colors -export const black: StyleFunction; -export const red: StyleFunction; -export const green: StyleFunction; -export const yellow: StyleFunction; -export const blue: StyleFunction; -export const magenta: StyleFunction; -export const cyan: StyleFunction; -export const white: StyleFunction; -export const gray: StyleFunction; -export const grey: StyleFunction; - -// bright colors -export const blackBright: StyleFunction; -export const redBright: StyleFunction; -export const greenBright: StyleFunction; -export const yellowBright: StyleFunction; -export const blueBright: StyleFunction; -export const magentaBright: StyleFunction; -export const cyanBright: StyleFunction; -export const whiteBright: StyleFunction; - -// background colors -export const bgBlack: StyleFunction; -export const bgRed: StyleFunction; -export const bgGreen: StyleFunction; -export const bgYellow: StyleFunction; -export const bgBlue: StyleFunction; -export const bgMagenta: StyleFunction; -export const bgCyan: StyleFunction; -export const bgWhite: StyleFunction; - -// bright background colors -export const bgBlackBright: StyleFunction; -export const bgRedBright: StyleFunction; -export const bgGreenBright: StyleFunction; -export const bgYellowBright: StyleFunction; -export const bgBlueBright: StyleFunction; -export const bgMagentaBright: StyleFunction; -export const bgCyanBright: StyleFunction; -export const bgWhiteBright: StyleFunction; - -export let enabled: boolean; -export let visible: boolean; -export const ansiRegex: RegExp; - -/** - * Remove styles from string - */ -export function stripColor(s: string): string; - -/** - * Remove styles from string - */ -export function strip(s: string): string; - -/** - * Remove styles from string - */ -export function unstyle(s: string): string; - -export const styles: StylesType; -export const symbols: SymbolsType; - -/** - * Outputs a string with check-symbol as prefix - */ -export function ok(...args: string[]): string; diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js deleted file mode 100644 index c4aaecf..0000000 --- a/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = () => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, 'g'); -}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json deleted file mode 100644 index 47d41d5..0000000 --- a/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "ansi-regex@3.0.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "ansi-regex@3.0.0", - "_id": "ansi-regex@3.0.0", - "_inBundle": false, - "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "_location": "/ansi-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-regex@3.0.0", - "name": "ansi-regex", - "escapedName": "ansi-regex", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "3.0.0" -} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md deleted file mode 100644 index 22db1c3..0000000 --- a/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] -``` - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c..0000000 --- a/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json deleted file mode 100644 index 9d2c4e2..0000000 --- a/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "ansi-styles@3.2.1", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "ansi-styles@3.2.1", - "_id": "ansi-styles@3.2.1", - "_inBundle": false, - "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "_location": "/ansi-styles", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-styles@3.2.1", - "name": "ansi-styles", - "escapedName": "ansi-styles", - "rawSpec": "3.2.1", - "saveSpec": null, - "fetchSpec": "3.2.1" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "_spec": "3.2.1", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "ava": { - "require": "babel-polyfill" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "dependencies": { - "color-convert": "^1.9.0" - }, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava" - }, - "version": "3.2.1" -} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2d..0000000 --- a/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/applicationinsights/LICENSE b/node_modules/applicationinsights/LICENSE deleted file mode 100644 index 5656101..0000000 --- a/node_modules/applicationinsights/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright © Microsoft Corporation - -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/applicationinsights/README.md b/node_modules/applicationinsights/README.md deleted file mode 100644 index 397a5c4..0000000 --- a/node_modules/applicationinsights/README.md +++ /dev/null @@ -1,449 +0,0 @@ -# Application Insights for Node.js - -[![npm version](https://badge.fury.io/js/applicationinsights.svg)](http://badge.fury.io/js/applicationinsights) -[![Build Status](https://travis-ci.org/Microsoft/ApplicationInsights-node.js.svg?branch=master)](https://travis-ci.org/Microsoft/ApplicationInsights-node.js) - -[Azure Application Insights][] monitors your backend services and components after -you deploy them to help you [discover and rapidly diagnose performance and other -issues][]. Add this SDK to your Node.js services to include deep info about Node.js -processes and their external dependencies such as database and cache services. -You can use this SDK for your Node.js services hosted anywhere: your datacenter, -Azure VMs and Web Apps, and even other public clouds. - -[Azure Application Insights]: https://azure.microsoft.com/documentation/articles/app-insights-overview/ -[discover and rapidly diagnose performance and other issues]: https://docs.microsoft.com/azure/application-insights/app-insights-detect-triage-diagnose - -This library tracks the following out-of-the-box: -- Incoming and outgoing HTTP requests -- Important system metrics such as CPU usage -- Unhandled exceptions -- Events from many popular third-party libraries ([see Automatic third-party instrumentation](#automatic-third-party-instrumentation)) - -You can manually track more aspects of your app and system using the API described in the -[Track custom telemetry](#track-custom-telemetry) section. - -## Getting Started - -1. Create an Application Insights resource in Azure by following [these instructions][]. -2. Grab the _Instrumentation Key_ (aka "ikey") from the resource you created in - step 1. Later, you'll either add it to your app's environment variables or - use it directly in your scripts. -3. Add the Application Insights Node.js SDK to your app's dependencies and - package.json: - ```bash - npm install --save applicationinsights - ``` - > *Note:* If you're using TypeScript, do not install a separate "typings" package. - > This NPM package contains built-in typings. -4. As early as possible in your app's code, load the Application Insights - package: - ```javascript - let appInsights = require('applicationinsights'); - ``` -5. Configure the local SDK by calling `appInsights.setup('_your_ikey_');`, using - the ikey you grabbed in step 2. Or put this ikey in the - `APPINSIGHTS_INSTRUMENTATIONKEY` environment variable and call - `appInsights.setup()` without parameters. - > For more configuration options see below. -6. Finally, start automatically collecting and sending data by calling - `appInsights.start();`. - -[these instructions]: https://docs.microsoft.com/azure/application-insights/app-insights-nodejs - - -## Basic Usage - -For out-of-the-box collection of HTTP requests, popular third-party library events, -unhandled exceptions, and system metrics: - -```javascript -let appInsights = require("applicationinsights"); -appInsights.setup("_your_ikey_").start(); -``` - -* If the instrumentation key is set in the environment variable - APPINSIGHTS\_INSTRUMENTATIONKEY, `.setup()` can be called with no - arguments. This makes it easy to use different ikeys for different - environments. - -Load the Application Insights library (i.e. `require("applicationinsights")`) as -early as possible in your scripts, before loading other packages. This is needed -so that the Application Insights library can prepare later packages for tracking. -If you encounter conflicts with other libraries doing similar preparation, try -loading the Application Insights library after those. - -Because of the way JavaScript handles callbacks, additional work is necessary to -track a request across external dependencies and later callbacks. By default -this additional tracking is enabled; disable it by calling -`setAutoDependencyCorrelation(false)` as described in the -Configuration section below. - -## Migrating from versions prior to 0.22 - -There are breaking changes between releases prior to version 0.22 and after. These -changes are designed to bring consistency with other Application Insights SDKs and -allow future extensibility. Please review this README for new method and property names. - -In general, you can migrate with the following: -- Replace references to `appInsights.client` with `appInsights.defaultClient` -- Replace references to `appInsights.getClient()` with `new appInsights.TelemetryClient()` -- Replace all arguments to client.track* methods with a single object containing named -properties as arguments. See your IDE's built-in type hinting, or [TelemetryTypes](https://github.com/Microsoft/ApplicationInsights-node.js/tree/develop/Declarations/Contracts/TelemetryTypes), for -the expected object for each type of telemetry. - -If you access SDK configuration functions without chaining them to `appInsights.setup()`, -you can now find these functions at appInsights.Configuration -(eg. `appInsights.Configuration.setAutoCollectDependencies(true)`). -Take care to review the changes to the default configuration in the next section. - -## Configuration - -The appInsights object provides a number of configuration methods. They are -listed in the following snippet with their default values. - -```javascript -let appInsights = require("applicationinsights"); -appInsights.setup("") - .setAutoDependencyCorrelation(true) - .setAutoCollectRequests(true) - .setAutoCollectPerformance(true, true) - .setAutoCollectExceptions(true) - .setAutoCollectDependencies(true) - .setAutoCollectConsole(true) - .setUseDiskRetryCaching(true) - .setSendLiveMetrics(false) - .setDistributedTracingTracingMode(appInsights.DistributedTracingModes.AI) - .start(); -``` - -Please review their descriptions in your IDE's built-in type hinting, or [applicationinsights.ts](https://github.com/Microsoft/ApplicationInsights-node.js/tree/develop/applicationinsights.ts) for -detailed information on what these control, and optional secondary arguments. - -Note that by default `setAutoCollectConsole` is configured to *exclude* calls to `console.log` -(and other `console` methods). By default, only calls to supported third-party loggers -(e.g. `winston`, `bunyan`) will be collected. You can change this behavior to *include* calls -to `console` methods by using `setAutoCollectConsole(true, true)`. - -### Sampling - -By default, the SDK will send all collected data to the Application Insights service. If you collect a lot of data, you might want to enable sampling to reduce the amount of data sent. Set the `samplingPercentage` field on the Config object of a Client to accomplish this. Setting `samplingPercentage` to 100 (the default) means all data will be sent, and 0 means nothing will be sent. - -If you are using automatic correlation, all data associated with a single request will be included or excluded as a unit. - -Add code such as the following to enable sampling: - -```javascript -const appInsights = require("applicationinsights"); -appInsights.setup(""); -appInsights.defaultClient.config.samplingPercentage = 33; // 33% of all telemetry will be sent to Application Insights -appInsights.start(); -``` - -### Multiple roles for multi-component applications - -If your application consists of multiple components that you wish to instrument all with the same Instrumentation Key and still see these components as separate units in the Portal as if they were using separate Instrumentation Keys (for example, as separate nodes on the Application Map) you may need to manually configure the RoleName field to distinguish one component's telemetry from other components sending data to your Application Insights resource. (See [Monitor multi-component applications with Application Insights (preview)](https://docs.microsoft.com/azure/application-insights/app-insights-monitor-multi-role-apps)) - -Use the following to set the RoleName field: - -```javascript -const appInsights = require("applicationinsights"); -appInsights.setup(""); -appInsights.defaultClient.context.tags[appInsights.defaultClient.context.keys.cloudRole] = "MyRoleName"; -appInsights.start(); -``` - -### Automatic third-party instrumentation - -In order to track context across asynchronous calls, some changes are required in third party libraries such as mongodb and redis. -By default ApplicationInsights will use [`diagnostic-channel-publishers`](https://github.com/Microsoft/node-diagnostic-channel/tree/master/src/diagnostic-channel-publishers) -to monkey-patch some of these libraries. -This can be disabled by setting the `APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL` environment variable. Note that by setting that -environment variable, events may no longer be correctly associated with the right operation. Individual monkey-patches can be -disabled by setting the `APPLICATION_INSIGHTS_NO_PATCH_MODULES` environment variable to a comma separated list of packages to -disable, e.g. `APPLICATION_INSIGHTS_NO_PATCH_MODULES=console,redis` to avoid patching the `console` and `redis` packages. - -Currently there are 9 packages which are instrumented: `bunyan`, `console`, `mongodb`, `mongodb-core`, `mysql`, `redis`, `winston`, -`pg`, and `pg-pool`. Visit the [diagnostic-channel-publishers' README](https://github.com/Microsoft/node-diagnostic-channel/blob/master/src/diagnostic-channel-publishers/README.md) -for information about exactly which versions of these packages are patched. - -The `bunyan`, `winston`, and `console` patches will generate Application Insights Trace events based on whether `setAutoCollectConsole` is enabled. -The rest will generate Application Insights Dependency events based on whether `setAutoCollectDependencies` is enabled. - -### Live Metrics -To enable sending live metrics of your app to Azure, use `setSendLiveMetrics(true)`. Filtering of live metrics in the Portal is currently not supported. - -### Extended Metrics ->***Note:*** The ability to send extended native metrics was added in version `1.4.0` - -To enable sending extended native metrics of your app to Azure, simply install the separate native metrics package. The SDK will automatically load it when it is installed and start collecting Node.js native metrics. -```zsh -npm install applicationinsights-native-metrics -``` -Currently, the native metrics package performs autocollection of Garbage Collection CPU time, Event Loop ticks, and heap usage: -- **Garbage Collection:** The amount of CPU time spent on each type of garbage collection, and how many occurrences of each type. -- **Event Loop:** How many ticks occurred and how much CPU time was spent in total. -- **Heap vs Non-Heap:** How much of your app's memory usage is in the heap or non-heap. - -### Distributed Tracing Modes -By default, this SDK will send headers understood by other applications/services instrumented with an Application Insights SDK. You can optionally enable sending/receiving of [W3C Trace Context](https://github.com/w3c/trace-context) headers in addition to the existing AI headers, so you will not break correlation with any of your existing legacy services. Enabling W3C headers will allow your app to correlate with other services not instrumented with Application Insights, but do adopt this W3C standard. - -```js -const appInsights = require("applicationinsights"); -appInsights - .setup("") - .setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C) - .start() -``` - -## Track custom telemetry - -You can track any request, event, metric or exception using the Application -Insights client. Examples follow: - -```javascript -let appInsights = require("applicationinsights"); -appInsights.setup().start(); // assuming ikey in env var. start() can be omitted to disable any non-custom data -let client = appInsights.defaultClient; -client.trackEvent({name: "my custom event", properties: {customProperty: "custom property value"}}); -client.trackException({exception: new Error("handled exceptions can be logged with this method")}); -client.trackMetric({name: "custom metric", value: 3}); -client.trackTrace({message: "trace message"}); -client.trackDependency({target:"http://dbname", name:"select customers proc", data:"SELECT * FROM Customers", duration:231, resultCode:0, success: true, dependencyTypeName: "ZSQL"}); -client.trackRequest({name:"GET /customers", url:"http://myserver/customers", duration:309, resultCode:200, success:true}); - -let http = require("http"); -http.createServer( (req, res) => { - client.trackNodeHttpRequest({request: req, response: res}); // Place at the beginning of your request handler -}); -``` - -An example utility using `trackMetric` to measure how long event loop scheduling takes: - -```javascript -function startMeasuringEventLoop() { - var startTime = process.hrtime(); - var sampleSum = 0; - var sampleCount = 0; - - // Measure event loop scheduling delay - setInterval(() => { - var elapsed = process.hrtime(startTime); - startTime = process.hrtime(); - sampleSum += elapsed[0] * 1e9 + elapsed[1]; - sampleCount++; - }, 0); - - // Report custom metric every second - setInterval(() => { - var samples = sampleSum; - var count = sampleCount; - sampleSum = 0; - sampleCount = 0; - - if (count > 0) { - var avgNs = samples / count; - var avgMs = Math.round(avgNs / 1e6); - client.trackMetric({name: "Event Loop Delay", value: avgMs}); - } - }, 1000); -} -``` - -## Preprocess data with Telemetry Processors - -```javascript -public addTelemetryProcessor(telemetryProcessor: (envelope: Contracts.Envelope, context: { http.RequestOptions, http.ClientRequest, http.ClientResponse, correlationContext }) => boolean) -``` - -You can process and filter collected data before it is sent for retention using -_Telemetry Processors_. Telemetry processors are called one by one in the -order they were added before the telemetry item is sent to the cloud. - -If a telemetry processor returns false that telemetry item will not be sent. - -All telemetry processors receive the telemetry data and its envelope to inspect and -modify. They also receive a context object. The contents of this object is defined by -the `contextObjects` parameter when calling a track method for manually tracked telemetry. -For automatically collected telemetry, this object is filled with available request information -and the persistent request context as provided by `appInsights.getCorrelationContext()` (if -automatic dependency correlation is enabled). - -The TypeScript type for a telemetry processor is: - -```typescript -telemetryProcessor: (envelope: ContractsModule.Contracts.Envelope, context: { http.RequestOptions, http.ClientRequest, http.ClientResponse, correlationContext }) => boolean; -``` - -For example, a processor that removes stack trace data from exceptions might be -written and added as follows: - -```javascript -function removeStackTraces ( envelope, context ) { - if (envelope.data.baseType === "Microsoft.ApplicationInsights.ExceptionData") { - var data = envelope.data.baseData; - if (data.exceptions && data.exceptions.length > 0) { - for (var i = 0; i < data.exceptions.length; i++) { - var exception = data.exceptions[i]; - exception.parsedStack = null; - exception.hasFullStack = false; - } - } - } - return true; -} - -appInsights.defaultClient.addTelemetryProcessor(removeStackTraces); -``` - -More info on the telemetry API is available in [the docs][]. - -[the docs]: https://azure.microsoft.com/documentation/articles/app-insights-api-custom-events-metrics/ - -## Use multiple instrumentation keys - -You can create multiple Azure Application Insights resources and send different -data to each by using their respective instrumentation keys ("ikey"). For -example: - -```javascript -let appInsights = require("applicationinsights"); - -// configure auto-collection under one ikey -appInsights.setup("_ikey-A_").start(); - -// track some events manually under another ikey -let otherClient = new appInsights.TelemetryClient("_ikey-B_"); -otherClient.trackEvent({name: "my custom event"}); -``` - -## Examples - -* Track dependencies - - ```javascript - let appInsights = require("applicationinsights"); - let client = new appInsights.TelemetryClient(); - - var success = false; - let startTime = Date.now(); - // execute dependency call here.... - let duration = Date.now() - startTime; - success = true; - - client.trackDependency({target:"http://dbname", name:"select customers proc", data:"SELECT * FROM Customers", duration:duration, resultCode:0, success: true, dependencyTypeName: "ZSQL"}); - ``` - -* Assign custom properties to be included with all events - - ```javascript - appInsights.defaultClient.commonProperties = { - environment: process.env.SOME_ENV_VARIABLE - }; - ``` - -* Manually track all HTTP GET requests - - Note that all requests are tracked by default. To disable automatic - collection, call `.setAutoCollectRequests(false)` before calling `start()`. - - ```javascript - appInsights.defaultClient.trackRequest({name:"GET /customers", url:"http://myserver/customers", duration:309, resultCode:200, success:true}); - ``` - Alternatively you can track requests using ```trackNodeHttpRequest``` method: - - ```javascript - var server = http.createServer((req, res) => { - if ( req.method === "GET" ) { - appInsights.defaultClient.trackNodeHttpRequest({request:req, response:res}); - } - // other work here.... - res.end(); - }); - ``` - -* Track server startup time - - ```javascript - let start = Date.now(); - server.on("listening", () => { - let duration = Date.now() - start; - appInsights.defaultClient.trackMetric({name: "server startup time", value: duration}); - }); - ``` - -## Advanced configuration options -The Client object contains a `config` property with many optional settings for -advanced scenarios. These can be set as follows: -``` -client.config.PROPERTYNAME = VALUE; -``` -These properties are client specific, so you can configure `appInsights.defaultClient` -separately from clients created with `new appInsights.TelemetryClient()`. - -| Property | Description | -| ------------------------------- |------------------------------------------------------------------------------------------------------------| -| instrumentationKey | An identifier for your Application Insights resource | -| endpointUrl | The ingestion endpoint to send telemetry payloads to | -| quickPulseHost | The Live Metrics Stream host to send live metrics telemetry to | -| proxyHttpUrl | A proxy server for SDK HTTP traffic (Optional, Default pulled from `http_proxy` environment variable) | -| proxyHttpsUrl | A proxy server for SDK HTTPS traffic (Optional, Default pulled from `https_proxy` environment variable) | -| httpAgent | An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) | -| httpsAgent | An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) | -| maxBatchSize | The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default `250`) | -| maxBatchIntervalMs | The maximum amount of time to wait to for a payload to reach maxBatchSize (Default `15000`) | -| disableAppInsights | A flag indicating if telemetry transmission is disabled (Default `false`) | -| samplingPercentage | The percentage of telemetry items tracked that should be transmitted (Default `100`) | -| correlationIdRetryIntervalMs | The time to wait before retrying to retrieve the id for cross-component correlation (Default `30000`) | -| correlationHeaderExcludedDomains| A list of domains to exclude from cross-component correlation header injection (Default See [Config.ts][]) | - -[Config.ts]: https://github.com/Microsoft/ApplicationInsights-node.js/blob/develop/Library/Config.ts - -## Branches - -- Ongoing development takes place on the [develop][] branch. **Please submit - pull requests to this branch.** -- Releases are merged to the [master][] branch and published to [npm][]. - -[master]: https://github.com/Microsoft/ApplicationInsights-node.js/tree/master -[develop]: https://github.com/Microsoft/ApplicationInsights-node.js/tree/develop -[npm]: https://www.npmjs.com/package/applicationinsights - -## Links - -* [ApplicationInsights-Home][] is our central repo for libraries and info for - all languages and platforms. -* Follow the latest Application Insights changes and announcements on the - [ApplicationInsights-Announcements][] repo. -* [SDK Release Schedule][] - -[ApplicationInsights-Announcements]: https://github.com/Microsoft/ApplicationInsights-Announcements -[ApplicationInsights-Home]: https://github.com/Microsoft/ApplicationInsights-Home -[SDK Release Schedule]: https://github.com/Microsoft/ApplicationInsights-Home/wiki/SDK-Release-Schedule - -## Contributing - -1. Install all dependencies with `npm install`. -2. Set an environment variable to your instrumentation key (optional). - ```bash - // windows - set APPINSIGHTS_INSTRUMENTATIONKEY= - // linux/macos - export APPINSIGHTS_INSTRUMENTATIONKEY= - ``` -3. Run tests - ```bash - npm run test - npm run backcompattest - npm run functionaltest - ``` - _Note: Functional tests require Docker_ - ---- - -This project has adopted the [Microsoft Open Source Code of Conduct][]. For more -information see the [Code of Conduct FAQ][] or contact -[opencode@microsoft.com][] with any additional questions or comments. - -[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/ -[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/ -[opencode@microsoft.com]: mailto:opencode@microsoft.com diff --git a/node_modules/applicationinsights/package.json b/node_modules/applicationinsights/package.json deleted file mode 100644 index 3814abb..0000000 --- a/node_modules/applicationinsights/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - "applicationinsights@1.4.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_from": "applicationinsights@1.4.0", - "_id": "applicationinsights@1.4.0", - "_inBundle": false, - "_integrity": "sha512-TV8MYb0Kw9uE2cdu4V/UvTKdOABkX2+Fga9iDz0zqV7FLrNXfmAugWZmmdTx4JoynYkln3d5CUHY3oVSUEbfFw==", - "_location": "/applicationinsights", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "applicationinsights@1.4.0", - "name": "applicationinsights", - "escapedName": "applicationinsights", - "rawSpec": "1.4.0", - "saveSpec": null, - "fetchSpec": "1.4.0" - }, - "_requiredBy": [ - "/vscode-extension-telemetry" - ], - "_resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.4.0.tgz", - "_spec": "1.4.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/Microsoft/ApplicationInsights-node.js/issues" - }, - "contributors": [ - { - "name": "Application Insights Developer Support", - "email": "aidevsupport@microsoft.com" - }, - { - "name": "Application Insights SDK Maintainers", - "email": "appinsightssdk@microsoft.com" - } - ], - "dependencies": { - "cls-hooked": "^4.2.2", - "continuation-local-storage": "^3.2.1", - "diagnostic-channel": "0.2.0", - "diagnostic-channel-publishers": "^0.3.2" - }, - "description": "Microsoft Application Insights module for Node.js", - "devDependencies": { - "@types/cls-hooked": "^4.3.0", - "@types/mocha": "2.2.48", - "@types/node": "4.2.4", - "@types/sinon": "2.1.2", - "applicationinsights-native-metrics": "0.0.5", - "mocha": "3.5.2", - "node-mocks-http": "1.2.3", - "sinon": "1.17.6", - "typescript": "2.4.2" - }, - "homepage": "https://github.com/Microsoft/ApplicationInsights-node.js#readme", - "keywords": [ - "exception monitoring", - "request monitoring", - "performance monitoring", - "application insights", - "microsoft", - "azure", - "cloud", - "tracing", - "telemetry", - "analytics", - "apm" - ], - "license": "MIT", - "main": "./out/applicationinsights.js", - "name": "applicationinsights", - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/ApplicationInsights-node.js.git" - }, - "scripts": { - "backcompattest": "npm run build && npm pack && node --use_strict ./Tests/BackCompatibility/RunBackCompatTests.js", - "build": "npm run build:deps && npm run build:compile", - "build:compile": "tsc --project ./tsconfig.json", - "build:deps": "npm update --dev", - "clean": "rm -rf ./out && rm -rf ./node_modules", - "functionaltest": "npm run build && npm pack && node --use_strict ./Tests/FunctionalTests/RunFunctionalTests.js", - "prepare": "npm run build:compile", - "prepublishOnly": "npm run build", - "pretest": "npm run build", - "test": "npm run test:ts && npm run test:js", - "test:js": "mocha ./Tests/js --recursive --no-exit", - "test:ts": "mocha ./out/Tests --recursive --no-exit" - }, - "types": "./out/applicationinsights.d.ts", - "version": "1.4.0" -} diff --git a/node_modules/arepl-backend/LICENSE b/node_modules/arepl-backend/LICENSE deleted file mode 100644 index b25c526..0000000 --- a/node_modules/arepl-backend/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Almenon - -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/arepl-backend/README.md b/node_modules/arepl-backend/README.md deleted file mode 100644 index ec0d299..0000000 --- a/node_modules/arepl-backend/README.md +++ /dev/null @@ -1,189 +0,0 @@ -# AREPL-backend [![Build Status](https://travis-ci.org/Almenon/AREPL-backend.svg?branch=master)](https://travis-ci.org/Almenon/AREPL-backend) [![Build status](https://ci.appveyor.com/api/projects/status/24o0d29l7ci9bif3?svg=true)](https://ci.appveyor.com/project/Almenon/arepl-backend) [![npm version](https://badge.fury.io/js/arepl-backend.svg)](https://badge.fury.io/js/arepl-backend) - -JS interface to python evaluator for AREPL. - -Evaluates python code and sends back the user variables and/or any errors. - -Although it is meant for AREPL, it is not dependent upon AREPL and can be used by any project. - -**Important Note**: this should ONLY be used to execute trusted code. It does not have any security features whatsoever. - -## Installation - -> npm install [arepl-backend](https://www.npmjs.com/package/arepl-backend) - -must have python 3 - -## Usage - -see for example useage. - -## For developers: - -Semantic release cheatsheet: - - | Commit message | Release type | - |----------------------|--------------| - | fix: msg | patch | - | feat: msg | feature | - | perf: msg | | - | BREAKING CHANGE: msg | breaking | - -## API - - - -#### Table of Contents - -- [constructor](#constructor) - - [Parameters](#parameters) -- [executing](#executing) -- [running](#running) -- [debounce](#debounce) -- [execCode](#execcode) - - [Parameters](#parameters-1) -- [sendStdin](#sendstdin) - - [Parameters](#parameters-2) -- [restart](#restart) - - [Parameters](#parameters-3) -- [stop](#stop) -- [start](#start) -- [onResult](#onresult) - - [Parameters](#parameters-4) -- [onPrint](#onprint) - - [Parameters](#parameters-5) -- [onStderr](#onstderr) - - [Parameters](#parameters-6) -- [handleResult](#handleresult) - - [Parameters](#parameters-7) -- [checkSyntax](#checksyntax) - - [Parameters](#parameters-8) -- [checkSyntaxFile](#checksyntaxfile) - - [Parameters](#parameters-9) -- [formatPythonException](#formatpythonexception) - - [Parameters](#parameters-10) - - [Examples](#examples) - -### constructor - -starts python_evaluator.py - -#### Parameters - -- `options` Process / Python options. If not specified sensible defaults are inferred. (optional, default `{}`) - -### executing - -whether python is busy executing inputted code - -### running - -whether python backend process is running / not running - -### debounce - -delays execution of function by ms milliseconds, resetting clock every time it is called -Useful for real-time execution so execCode doesn't get called too often -thanks to - -### execCode - -does not do anything if program is currently executing code - -#### Parameters - -- `code` - -### sendStdin - -#### Parameters - -- `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -### restart - -kills python process and restarts. Force-kills if necessary after 50ms. -After process restarts the callback passed in is invoked - -#### Parameters - -- `callback` (optional, default `()=>{}`) - -### stop - -kills python process. force-kills if necessary after 50ms. -you can check python_evaluator.running to see if process is dead yet - -### start - -starts python_evaluator.py. Will NOT WORK with python 2 - -### onResult - -Overwrite this with your own handler. -is called when program fails or completes - -#### Parameters - -- `foo` - -### onPrint - -Overwrite this with your own handler. -Is called when program prints - -#### Parameters - -- `foo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -### onStderr - -Overwrite this with your own handler. -Is called when program logs stderr - -#### Parameters - -- `foo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -### handleResult - -handles pyshell results and calls onResult / onPrint - -#### Parameters - -- `results` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -### checkSyntax - -checks syntax without executing code - -#### Parameters - -- `code` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** rejects w/ stderr if syntax failure - -### checkSyntaxFile - -checks syntax without executing code - -#### Parameters - -- `filePath` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** - -Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** rejects w/ stderr if syntax failure - -### formatPythonException - -gets rid of unnecessary File "" message in exception - -#### Parameters - -- `err` - -#### Examples - -```javascript -err: -Traceback (most recent call last):\n File "", line 1, in \nNameError: name \'x\' is not defined\n -``` diff --git a/node_modules/arepl-backend/eval.test.js b/node_modules/arepl-backend/eval.test.js deleted file mode 100644 index c0288b7..0000000 --- a/node_modules/arepl-backend/eval.test.js +++ /dev/null @@ -1,270 +0,0 @@ -"use strict"; -/*global suite, test*/ //comment for eslint -Object.defineProperty(exports, "__esModule", { value: true }); -// This test uses TDD Mocha. see https://mochajs.org/ for help -// http://ricostacruz.com/cheatsheets/mocha-tdd -// The module 'assert' provides assertion methods from node -const assert = require("assert"); -const index_1 = require("./index"); -function isEmpty(obj) { - return Object.keys(obj).length === 0; -} -suite("python_evaluator Tests", () => { - let pyEvaluator = new index_1.PythonEvaluator(); - let input = { - evalCode: "", - savedCode: "", - filePath: "", - usePreviousVariables: false, - showGlobalVars: true, - default_filter_vars: [], - default_filter_types: ["", ""] - }; - const pythonStartupTime = 3500; - // python 3.7 has much faster startup time - // when we drop support for 3.6 we can decrease this - suiteSetup(function (done) { - this.timeout(pythonStartupTime + 500); - pyEvaluator.start(); - // wait for for python to start - setTimeout(() => done(), pythonStartupTime); - }); - test("sanity check: 1+1=2", () => { - assert.equal(1 + 1, 2); - }); - test("returns result", function (done) { - pyEvaluator.onResult = (result) => { - assert.notEqual(result, null); - done(); - }; - input.evalCode = "x"; - pyEvaluator.execCode(input); - }); - test("arepl_store works", function (done) { - pyEvaluator.onPrint = (result) => { - assert.strictEqual(result, "3"); - }; - input.evalCode = "arepl_store=3"; - pyEvaluator.onResult = () => { }; - pyEvaluator.execCode(input); - let onSecondRun = false; - pyEvaluator.onResult = (result) => { - if (result.userErrorMsg) { - done(result.userErrorMsg); - } - else if (!onSecondRun) { - input.evalCode = "print(arepl_store)"; - pyEvaluator.execCode(input); - onSecondRun = true; - } - else { - done(); - } - }; - }); - // todo: FIX THIS! - // test("no encoding errors with utf16", function(done){ - // pyEvaluator.onResult = (result)=>{ - // assert.equal(result.userError, '') - // assert.equal(result.internalError, null) - // done() - // } - // input.evalCode = "#㍦" - // pyEvaluator.execCode(input) - // }) - test("dump returns result", function (done) { - let gotDump = false; - pyEvaluator.onResult = (result) => { - if (gotDump) - return; - assert.notEqual(result, null); - assert.equal(isEmpty(result.userError), true); - assert.equal(result.internalError, null); - assert.equal(result.userVariables['dump output'], 5); - assert.equal(result.caller, ''); - assert.equal(result.lineno, 1); - gotDump = true; - done(); - }; - input.evalCode = "from arepl_dump import dump;dump(5)"; - pyEvaluator.execCode(input); - }); - test("returns syntax error when incorrect syntax", function (done) { - pyEvaluator.onResult = (result) => { - assert.notEqual(result.userError, null); - assert.equal(result.userError.filename, ''); - assert.equal(result.userError.lineno, '1'); - assert.equal(result.userError.msg, 'invalid syntax'); - done(); - }; - input.evalCode = "x="; - pyEvaluator.execCode(input); - }); - test("returns user variables", function (done) { - pyEvaluator.onResult = (result) => { - assert.equal(result.userVariables['x'], 1); - done(); - }; - input.evalCode = "x=1"; - pyEvaluator.execCode(input); - }); - test("uses previousRun variables asked", function (done) { - pyEvaluator.onResult = (result) => { - assert.equal(result.userVariables['y'], 1); - done(); - }; - input.evalCode = "y=x"; - input.usePreviousVariables = true; - pyEvaluator.execCode(input); - input.usePreviousVariables = false; - }); - test("can print stdout", function (done) { - let hasPrinted = false; - pyEvaluator.onPrint = (stdout) => { - assert.equal(stdout, "hello world"); - hasPrinted = true; - }; - pyEvaluator.onResult = () => { - if (!hasPrinted) - assert.fail("program has returned result", "program should still be printing"); - else - done(); - }; - input.evalCode = "print('hello world')"; - pyEvaluator.execCode(input); - }); - test("can print stderr", function (done) { - let hasLogged = false; - pyEvaluator.onStderr = (stderr) => { - assert.equal(stderr, "hello world\r"); - // I have nooo clue why the \r is at the end - // for some reason python-shell recieves hello world\r\r\n - hasLogged = true; - }; - pyEvaluator.onResult = (result) => { - if (!hasLogged) - assert.fail("program has returned result", "program should still be logging"); - else - done(); - }; - input.evalCode = "import sys;sys.stderr.write('hello world\\r\\n')"; - pyEvaluator.execCode(input); - }); - test("can print multiple lines", function (done) { - let firstPrint = false; - let secondPrint = false; - pyEvaluator.onPrint = (stdout) => { - if (firstPrint) { - assert.equal(stdout, '2'); - secondPrint = true; - } - else { - assert.equal(stdout, "1"); - firstPrint = true; - } - }; - pyEvaluator.onResult = () => { - if (!secondPrint) - assert.fail("program has returned result", "program should still be printing"); - else - done(); - }; - input.evalCode = "[print(x) for x in [1,2]]"; - pyEvaluator.execCode(input); - }); - test("returns result after print", function (done) { - pyEvaluator.onPrint = (stdout) => { - assert.equal(stdout, "hello world"); - assert.equal(pyEvaluator.executing, true); - }; - pyEvaluator.onResult = () => { - assert.equal(pyEvaluator.executing, false); - done(); - }; - input.evalCode = "print('hello world')"; - pyEvaluator.execCode(input); - }); - test("can restart", function (done) { - this.timeout(this.timeout() + pythonStartupTime); - assert.equal(pyEvaluator.running, true); - assert.equal(pyEvaluator.restarting, false); - assert.equal(pyEvaluator.executing, false); - pyEvaluator.restart(() => { - assert.equal(pyEvaluator.running, true); - assert.equal(pyEvaluator.executing, false); - setTimeout(() => { - // by now python should be restarted and accepting input - pyEvaluator.onResult = () => done(); - input.evalCode = "x"; - pyEvaluator.execCode(input); - }, 1500); - }); - }); - test("strips out unnecessary error info", function (done) { - pyEvaluator.onResult = (result) => { - assert.equal(result.userErrorMsg, "Traceback (most recent call last):\n line 1, in \nNameError: name 'x' is not defined\n"); - done(); - }; - input.evalCode = "x"; - pyEvaluator.execCode(input); - }); - test("strips out unnecessary error info even with long tracebacks", function (done) { - pyEvaluator.onResult = (result) => { - // asserting the exact string would result in flaky tests - // because internal python code could change & the traceback would be different - // so we just do some generic checks - assert.equal(result.userErrorMsg.includes("TypeError"), true); - assert.equal(result.userErrorMsg.split('File ').length > 1, true); - assert.equal(result.userErrorMsg.includes("python_evaluator.py"), false); - assert.equal(result.userErrorMsg.includes("exec(data['evalCode'], evalLocals)"), false); - done(); - }; - input.evalCode = "import json;json.dumps(json)"; - pyEvaluator.execCode(input); - }); - test("strips out unnecessary error info even with multiple tracebacks", function (done) { - pyEvaluator.onResult = (result) => { - assert.equal(result.userErrorMsg, `Traceback (most recent call last): - line 6, in - line 3, in foo -Exception - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - line 8, in -NameError: name 'fah' is not defined -`); - done(); - }; - input.evalCode = ` -def foo(): - raise Exception - -try: - foo() -except Exception as e: - fah`; - pyEvaluator.execCode(input); - }); - test("prints in real-time", function (done) { - let printed = false; - pyEvaluator.onPrint = (stdout) => { printed = true; }; - pyEvaluator.onResult = () => { done(); }; - setTimeout(() => { if (!printed) - assert.fail(""); }, 25); - input.evalCode = "from time import sleep\nprint('a')\nsleep(.05)\nprint(b)"; - pyEvaluator.execCode(input); - }); - test("checks syntax", function (done) { - pyEvaluator.checkSyntax("x=").then(() => { - assert.fail("promise should have been rejected"); - }).catch(() => { }); - pyEvaluator.checkSyntax("x=1").then(() => { - done(); - }).catch((err) => { - assert.fail("syntax was correct there should not have been an error"); - }); - }); -}); -//# sourceMappingURL=eval.test.js.map \ No newline at end of file diff --git a/node_modules/arepl-backend/eval.test.js.map b/node_modules/arepl-backend/eval.test.js.map deleted file mode 100644 index f165f42..0000000 --- a/node_modules/arepl-backend/eval.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eval.test.js","sourceRoot":"","sources":["eval.test.ts"],"names":[],"mappings":";AAAA,sBAAsB,CAAC,oBAAoB;;AAE3C,8DAA8D;AAC9D,+CAA+C;AAE/C,2DAA2D;AAC3D,iCAAgC;AAEhC,mCAAuC;AAEvC,SAAS,OAAO,CAAC,GAAG;IAChB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC;AAED,KAAK,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACjC,IAAI,WAAW,GAAG,IAAI,uBAAe,EAAE,CAAA;IACvC,IAAI,KAAK,GAAG;QACV,QAAQ,EAAC,EAAE;QACX,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,oBAAoB,EAAE,KAAK;QAC3B,cAAc,EAAE,IAAI;QACpB,mBAAmB,EAAE,EAAE;QACvB,oBAAoB,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;KACjE,CAAA;IACD,MAAM,iBAAiB,GAAG,IAAI,CAAA;IAC9B,0CAA0C;IAC1C,oDAAoD;IAEpD,UAAU,CAAC,UAAS,IAAI;QACpB,IAAI,CAAC,OAAO,CAAC,iBAAiB,GAAC,GAAG,CAAC,CAAA;QACnC,WAAW,CAAC,KAAK,EAAE,CAAA;QACnB,+BAA+B;QAC/B,UAAU,CAAC,GAAE,EAAE,CAAA,IAAI,EAAE,EAAE,iBAAiB,CAAC,CAAA;IAC7C,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,MAAM,CAAC,KAAK,CAAC,CAAC,GAAC,CAAC,EAAC,CAAC,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,gBAAgB,EAAE,UAAS,IAAI;QAChC,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC7B,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAA;QACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,mBAAmB,EAAE,UAAS,IAAI;QACnC,WAAW,CAAC,OAAO,GAAG,CAAC,MAAM,EAAC,EAAE;YAC5B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QACnC,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,eAAe,CAAA;QAChC,WAAW,CAAC,QAAQ,GAAG,GAAE,EAAE,GAAC,CAAC,CAAA;QAC7B,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAE3B,IAAI,WAAW,GAAG,KAAK,CAAA;QACvB,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,IAAG,MAAM,CAAC,YAAY,EAAC;gBACnB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;aAC5B;iBACI,IAAG,CAAC,WAAW,EAAC;gBACjB,KAAK,CAAC,QAAQ,GAAG,oBAAoB,CAAA;gBACrC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC3B,WAAW,GAAG,IAAI,CAAA;aACrB;iBACG;gBACA,IAAI,EAAE,CAAA;aACT;QACL,CAAC,CAAA;IACL,CAAC,CAAC,CAAA;IAEF,kBAAkB;IAClB,wDAAwD;IACxD,yCAAyC;IACzC,6CAA6C;IAC7C,mDAAmD;IACnD,iBAAiB;IACjB,QAAQ;IACR,4BAA4B;IAC5B,kCAAkC;IAClC,KAAK;IAEL,IAAI,CAAC,qBAAqB,EAAE,UAAS,IAAI;QACrC,IAAI,OAAO,GAAG,KAAK,CAAA;QACnB,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,IAAG,OAAO;gBAAE,OAAM;YAClB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC7B,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAA;YAC7C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;YACxC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAA;YACpD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YAC9B,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,qCAAqC,CAAA;QACtD,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,4CAA4C,EAAE,UAAS,IAAI;QAC5D,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;YACnD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;YAC1C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAA;YACpD,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAA;QACrB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,wBAAwB,EAAE,UAAS,IAAI;QACxC,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;YAC1C,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAA;QACtB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,kCAAkC,EAAE,UAAS,IAAI;QAClD,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;YAC1C,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAA;QACtB,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAA;QACjC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC3B,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAA;IACtC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,kBAAkB,EAAE,UAAS,IAAI;QAClC,IAAI,UAAU,GAAG,KAAK,CAAA;QACtB,WAAW,CAAC,OAAO,GAAG,CAAC,MAAM,EAAC,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;YACnC,UAAU,GAAG,IAAI,CAAA;QACrB,CAAC,CAAA;QAED,WAAW,CAAC,QAAQ,GAAG,GAAG,EAAE;YACxB,IAAG,CAAC,UAAU;gBAAE,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAC,kCAAkC,CAAC,CAAA;;gBACxF,IAAI,EAAE,CAAA;QACf,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,sBAAsB,CAAA;QACvC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,kBAAkB,EAAE,UAAS,IAAI;QAClC,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;YACrC,4CAA4C;YAC5C,0DAA0D;YAC1D,SAAS,GAAG,IAAI,CAAA;QACpB,CAAC,CAAA;QAED,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE;YAC9B,IAAG,CAAC,SAAS;gBAAE,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAC,iCAAiC,CAAC,CAAA;;gBACtF,IAAI,EAAE,CAAA;QACf,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,kDAAkD,CAAA;QACnE,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,0BAA0B,EAAE,UAAS,IAAI;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAA;QACtB,IAAI,WAAW,GAAG,KAAK,CAAA;QAEvB,WAAW,CAAC,OAAO,GAAG,CAAC,MAAM,EAAC,EAAE;YAC5B,IAAG,UAAU,EAAC;gBACV,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;gBACzB,WAAW,GAAG,IAAI,CAAA;aACrB;iBACG;gBACA,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;gBACzB,UAAU,GAAG,IAAI,CAAA;aACpB;QACL,CAAC,CAAA;QAED,WAAW,CAAC,QAAQ,GAAG,GAAG,EAAE;YACxB,IAAG,CAAC,WAAW;gBAAE,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAC,kCAAkC,CAAC,CAAA;;gBACzF,IAAI,EAAE,CAAA;QACf,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,2BAA2B,CAAA;QAC5C,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,4BAA4B,EAAE,UAAS,IAAI;QAC5C,WAAW,CAAC,OAAO,GAAG,CAAC,MAAM,EAAC,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;YACnC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QAC7C,CAAC,CAAA;QAED,WAAW,CAAC,QAAQ,GAAG,GAAG,EAAE;YACxB,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;YAC1C,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,sBAAsB,CAAA;QACvC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,aAAa,EAAE,UAAS,IAAI;QAE7B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAC,iBAAiB,CAAC,CAAA;QAE9C,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAC3C,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QAE1C,WAAW,CAAC,OAAO,CAAC,GAAE,EAAE;YACpB,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;YAE1C,UAAU,CAAC,GAAE,EAAE;gBACX,wDAAwD;gBACxD,WAAW,CAAC,QAAQ,GAAG,GAAE,EAAE,CAAA,IAAI,EAAE,CAAA;gBACjC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAA;gBACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC/B,CAAC,EAAC,IAAI,CAAC,CAAA;QACX,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,mCAAmC,EAAE,UAAS,IAAI;QACnD,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,iGAAiG,CAAC,CAAA;YACpI,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAA;QACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,6DAA6D,EAAE,UAAS,IAAI;QAC7E,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,yDAAyD;YACzD,+EAA+E;YAC/E,oCAAoC;YACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAA;YAC7D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,CAAA;YACjE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,KAAK,CAAC,CAAA;YACxE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,oCAAoC,CAAC,EAAE,KAAK,CAAC,CAAA;YACvF,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QACD,KAAK,CAAC,QAAQ,GAAG,8BAA8B,CAAA;QAC/C,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,iEAAiE,EAAE,UAAS,IAAI;QACjF,WAAW,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAC,EAAE;YAC7B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE;;;;;;;;;;CAU7C,CAAC,CAAA;YACU,IAAI,EAAE,CAAA;QACV,CAAC,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG;;;;;;;QAOjB,CAAA;QAEA,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,qBAAqB,EAAE,UAAS,IAAI;QACrC,IAAI,OAAO,GAAG,KAAK,CAAA;QAEnB,WAAW,CAAC,OAAO,GAAG,CAAC,MAAM,EAAC,EAAE,GAAE,OAAO,GAAG,IAAI,CAAA,CAAC,CAAC,CAAA;QAClD,WAAW,CAAC,QAAQ,GAAG,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA,CAAC,CAAC,CAAA;QAEvC,UAAU,CAAC,GAAE,EAAE,GAAE,IAAG,CAAC,OAAO;YAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpD,KAAK,CAAC,QAAQ,GAAG,0DAA0D,CAAA;QAC3E,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,eAAe,EAAE,UAAS,IAAI;QAC/B,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAE,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAA;QACpD,CAAC,CAAC,CAAC,KAAK,CAAC,GAAE,EAAE,GAAC,CAAC,CAAC,CAAA;QAEhB,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAE,EAAE;YACpC,IAAI,EAAE,CAAA;QACV,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAC,EAAE;YACZ,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;QACzE,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AAEN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/arepl-backend/eval.test.ts b/node_modules/arepl-backend/eval.test.ts deleted file mode 100644 index b78a49a..0000000 --- a/node_modules/arepl-backend/eval.test.ts +++ /dev/null @@ -1,305 +0,0 @@ -/*global suite, test*/ //comment for eslint - -// This test uses TDD Mocha. see https://mochajs.org/ for help -// http://ricostacruz.com/cheatsheets/mocha-tdd - -// The module 'assert' provides assertion methods from node -import * as assert from 'assert' - -import {PythonEvaluator} from './index' - -function isEmpty(obj) { - return Object.keys(obj).length === 0; -} - -suite("python_evaluator Tests", () => { - let pyEvaluator = new PythonEvaluator() - let input = { - evalCode:"", - savedCode: "", - filePath: "", - usePreviousVariables: false, - showGlobalVars: true, - default_filter_vars: [], - default_filter_types: ["", ""] - } - const pythonStartupTime = 3500 - // python 3.7 has much faster startup time - // when we drop support for 3.6 we can decrease this - - suiteSetup(function(done){ - this.timeout(pythonStartupTime+500) - pyEvaluator.start() - // wait for for python to start - setTimeout(()=>done(), pythonStartupTime) - }) - - test("sanity check: 1+1=2", () => { - assert.equal(1+1,2) - }) - - test("returns result", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.notEqual(result, null) - done() - } - input.evalCode = "x" - pyEvaluator.execCode(input) - }) - - test("arepl_store works", function(done){ - pyEvaluator.onPrint = (result)=>{ - assert.strictEqual(result, "3") - } - - input.evalCode = "arepl_store=3" - pyEvaluator.onResult = ()=>{} - pyEvaluator.execCode(input) - - let onSecondRun = false - pyEvaluator.onResult = (result)=>{ - if(result.userErrorMsg){ - done(result.userErrorMsg) - } - else if(!onSecondRun){ - input.evalCode = "print(arepl_store)" - pyEvaluator.execCode(input) - onSecondRun = true - } - else{ - done() - } - } - }) - - // todo: FIX THIS! - // test("no encoding errors with utf16", function(done){ - // pyEvaluator.onResult = (result)=>{ - // assert.equal(result.userError, '') - // assert.equal(result.internalError, null) - // done() - // } - // input.evalCode = "#㍦" - // pyEvaluator.execCode(input) - // }) - - test("dump returns result", function(done){ - let gotDump = false - pyEvaluator.onResult = (result)=>{ - if(gotDump) return - assert.notEqual(result, null) - assert.equal(isEmpty(result.userError), true) - assert.equal(result.internalError, null) - assert.equal(result.userVariables['dump output'], 5) - assert.equal(result.caller, '') - assert.equal(result.lineno, 1) - gotDump = true - done() - } - input.evalCode = "from arepl_dump import dump;dump(5)" - pyEvaluator.execCode(input) - }) - - test("returns syntax error when incorrect syntax", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.notEqual(result.userError, null) - assert.equal(result.userError.filename, '') - assert.equal(result.userError.lineno, '1') - assert.equal(result.userError.msg, 'invalid syntax') - done() - } - input.evalCode = "x=" - pyEvaluator.execCode(input) - }) - - test("returns user variables", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.equal(result.userVariables['x'], 1) - done() - } - input.evalCode = "x=1" - pyEvaluator.execCode(input) - }) - - test("uses previousRun variables asked", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.equal(result.userVariables['y'], 1) - done() - } - input.evalCode = "y=x" - input.usePreviousVariables = true - pyEvaluator.execCode(input) - input.usePreviousVariables = false - }) - - test("can print stdout", function(done){ - let hasPrinted = false - pyEvaluator.onPrint = (stdout)=>{ - assert.equal(stdout, "hello world") - hasPrinted = true - } - - pyEvaluator.onResult = () => { - if(!hasPrinted) assert.fail("program has returned result","program should still be printing") - else done() - } - - input.evalCode = "print('hello world')" - pyEvaluator.execCode(input) - }) - - test("can print stderr", function(done){ - let hasLogged = false - pyEvaluator.onStderr = (stderr)=>{ - assert.equal(stderr, "hello world\r") - // I have nooo clue why the \r is at the end - // for some reason python-shell recieves hello world\r\r\n - hasLogged = true - } - - pyEvaluator.onResult = (result) => { - if(!hasLogged) assert.fail("program has returned result","program should still be logging") - else done() - } - - input.evalCode = "import sys;sys.stderr.write('hello world\\r\\n')" - pyEvaluator.execCode(input) - }) - - test("can print multiple lines", function(done){ - let firstPrint = false - let secondPrint = false - - pyEvaluator.onPrint = (stdout)=>{ - if(firstPrint){ - assert.equal(stdout, '2') - secondPrint = true - } - else{ - assert.equal(stdout, "1") - firstPrint = true - } - } - - pyEvaluator.onResult = () => { - if(!secondPrint) assert.fail("program has returned result","program should still be printing") - else done() - } - - input.evalCode = "[print(x) for x in [1,2]]" - pyEvaluator.execCode(input) - }) - - test("returns result after print", function(done){ - pyEvaluator.onPrint = (stdout)=>{ - assert.equal(stdout, "hello world") - assert.equal(pyEvaluator.executing, true) - } - - pyEvaluator.onResult = () => { - assert.equal(pyEvaluator.executing, false) - done() - } - - input.evalCode = "print('hello world')" - pyEvaluator.execCode(input) - }) - - test("can restart", function(done){ - - this.timeout(this.timeout()+pythonStartupTime) - - assert.equal(pyEvaluator.running, true) - assert.equal(pyEvaluator.restarting, false) - assert.equal(pyEvaluator.executing, false) - - pyEvaluator.restart(()=>{ - assert.equal(pyEvaluator.running, true) - assert.equal(pyEvaluator.executing, false) - - setTimeout(()=>{ - // by now python should be restarted and accepting input - pyEvaluator.onResult = ()=>done() - input.evalCode = "x" - pyEvaluator.execCode(input) - },1500) - }) - }) - - test("strips out unnecessary error info", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.equal(result.userErrorMsg, "Traceback (most recent call last):\n line 1, in \nNameError: name 'x' is not defined\n") - done() - } - input.evalCode = "x" - pyEvaluator.execCode(input) - }) - - test("strips out unnecessary error info even with long tracebacks", function(done){ - pyEvaluator.onResult = (result)=>{ - // asserting the exact string would result in flaky tests - // because internal python code could change & the traceback would be different - // so we just do some generic checks - assert.equal(result.userErrorMsg.includes("TypeError"), true) - assert.equal(result.userErrorMsg.split('File ').length > 1, true) - assert.equal(result.userErrorMsg.includes("python_evaluator.py"), false) - assert.equal(result.userErrorMsg.includes("exec(data['evalCode'], evalLocals)"), false) - done() - } - input.evalCode = "import json;json.dumps(json)" - pyEvaluator.execCode(input) - }) - - test("strips out unnecessary error info even with multiple tracebacks", function(done){ - pyEvaluator.onResult = (result)=>{ - assert.equal(result.userErrorMsg, `Traceback (most recent call last): - line 6, in - line 3, in foo -Exception - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - line 8, in -NameError: name 'fah' is not defined -`) - done() - } - - input.evalCode = ` -def foo(): - raise Exception - -try: - foo() -except Exception as e: - fah` - - pyEvaluator.execCode(input) - }) - - test("prints in real-time", function(done){ - let printed = false - - pyEvaluator.onPrint = (stdout)=>{ printed = true } - pyEvaluator.onResult = () => { done() } - - setTimeout(()=>{ if(!printed) assert.fail("") }, 25) - - input.evalCode = "from time import sleep\nprint('a')\nsleep(.05)\nprint(b)" - pyEvaluator.execCode(input) - }) - - test("checks syntax", function(done){ - pyEvaluator.checkSyntax("x=").then(()=>{ - assert.fail("promise should have been rejected") - }).catch(()=>{}) - - pyEvaluator.checkSyntax("x=1").then(()=>{ - done() - }).catch((err)=>{ - assert.fail("syntax was correct there should not have been an error") - }) - }) - -}) diff --git a/node_modules/arepl-backend/index.js b/node_modules/arepl-backend/index.js deleted file mode 100644 index 15eb3ec..0000000 --- a/node_modules/arepl-backend/index.js +++ /dev/null @@ -1,225 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const python_shell_1 = require("python-shell"); -class PythonEvaluator { - /** - * starts python_evaluator.py - * @param options Process / Python options. If not specified sensible defaults are inferred. - */ - constructor(options = {}) { - this.options = options; - /** - * whether python is busy executing inputted code - */ - this.executing = false; - /** - * whether python backend process is running / not running - */ - this.running = false; - this.restarting = false; - /** - * delays execution of function by ms milliseconds, resetting clock every time it is called - * Useful for real-time execution so execCode doesn't get called too often - * thanks to https://stackoverflow.com/a/1909508/6629672 - */ - this.debounce = (function () { - let timer = 0; - return function (callback, ms, ...args) { - clearTimeout(timer); - timer = setTimeout(callback, ms, args); - }; - })(); - if (process.platform == "darwin") { - //needed for Mac to prevent ENOENT - process.env.PATH = ["/usr/local/bin", process.env.PATH].join(":"); - } - // we want unbuffered mode by default because it can be frustrating to the user - // if they run the program but don't see any print output immediately. - if (!options.pythonOptions) - this.options.pythonOptions = ['-u']; - if (!options.pythonPath) - this.options.pythonPath = python_shell_1.PythonShell.defaultPythonPath; - if (!options.scriptPath) - this.options.scriptPath = PythonEvaluator.areplPythonBackendFolderPath; - } - /** - * does not do anything if program is currently executing code - */ - execCode(code) { - if (this.executing) - return; - this.executing = true; - this.startTime = Date.now(); - this.pyshell.send(JSON.stringify(code)); - } - /** - * @param {string} message - */ - sendStdin(message) { - this.pyshell.send(message); - } - /** - * kills python process and restarts. Force-kills if necessary after 50ms. - * After process restarts the callback passed in is invoked - */ - restart(callback = () => { }) { - this.restarting = false; - // register callback for restart - // using childProcess callback instead of pyshell callback - // (pyshell callback only happens when process exits voluntarily) - this.pyshell.childProcess.on('exit', () => { - this.restarting = true; - this.executing = false; - this.start(); - callback(); - }); - this.stop(); - } - /** - * kills python process. force-kills if necessary after 50ms. - * you can check python_evaluator.running to see if process is dead yet - */ - stop() { - // pyshell has 50 ms to die gracefully - this.pyshell.childProcess.kill(); - this.running = !this.pyshell.childProcess.killed; - if (this.running) - console.info("pyshell refused to die"); - else - this.executing = false; - setTimeout(() => { - if (this.running && !this.restarting) { - // murder the process with extreme prejudice - this.pyshell.childProcess.kill('SIGKILL'); - if (this.pyshell.childProcess.killed) { - console.error("the python process simply cannot be killed!"); - } - else - this.executing = false; - } - }, 50); - } - /** - * starts python_evaluator.py. Will NOT WORK with python 2 - */ - start() { - console.log("Starting Python..."); - this.pyshell = new python_shell_1.PythonShell('arepl_python_evaluator.py', this.options); - this.pyshell.on('message', message => { - this.handleResult(message); - }); - this.pyshell.on('stderr', (log) => { - this.onStderr(log); - }); - this.running = true; - } - /** - * Overwrite this with your own handler. - * is called when program fails or completes - */ - onResult(foo) { } - /** - * Overwrite this with your own handler. - * Is called when program prints - * @param {string} foo - */ - onPrint(foo) { } - /** - * Overwrite this with your own handler. - * Is called when program logs stderr - * @param {string} foo - */ - onStderr(foo) { } - /** - * handles pyshell results and calls onResult / onPrint - * @param {string} results - */ - handleResult(results) { - let pyResult = { - userError: null, - userErrorMsg: "", - userVariables: {}, - execTime: 0, - totalTime: 0, - totalPyTime: 0, - internalError: "", - caller: "", - lineno: -1, - done: true - }; - //result should have identifier, otherwise it is just a printout from users code - if (results.startsWith(PythonEvaluator.identifier)) { - try { - results = results.replace(PythonEvaluator.identifier, ""); - pyResult = JSON.parse(results); - this.executing = !pyResult['done']; - pyResult.execTime = pyResult.execTime * 1000; // convert into ms - pyResult.totalPyTime = pyResult.totalPyTime * 1000; - //@ts-ignore pyResult.userVariables is sent to as string, we convert to object - pyResult.userVariables = JSON.parse(pyResult.userVariables); - //@ts-ignore pyResult.userError is sent to as string, we convert to object - pyResult.userError = pyResult.userError ? JSON.parse(pyResult.userError) : {}; - if (pyResult.userErrorMsg) { - pyResult.userErrorMsg = this.formatPythonException(pyResult.userErrorMsg); - } - pyResult.totalTime = Date.now() - this.startTime; - this.onResult(pyResult); - } - catch (err) { - if (err instanceof Error) { - err.message = err.message + "\nresults: " + results; - } - throw err; - } - } - else { - this.onPrint(results); - } - } - /** - * checks syntax without executing code - * @param {string} code - * @returns {Promise} rejects w/ stderr if syntax failure - */ - checkSyntax(code) { - return __awaiter(this, void 0, void 0, function* () { - return python_shell_1.PythonShell.checkSyntax(code); - }); - } - /** - * checks syntax without executing code - * @param {string} filePath - * @returns {Promise} rejects w/ stderr if syntax failure - */ - checkSyntaxFile(filePath) { - return __awaiter(this, void 0, void 0, function* () { - // note that this should really be done in python_evaluator.py - // but communication with that happens through just one channel (stdin/stdout) - // so for now i prefer to keep this seperate - return python_shell_1.PythonShell.checkSyntaxFile(filePath); - }); - } - /** - * gets rid of unnecessary File "" message in exception - * @example err: - * Traceback (most recent call last):\n File "", line 1, in \nNameError: name \'x\' is not defined\n - */ - formatPythonException(err) { - //replace File "" (pointless) - err = err.replace(/File \"\", /g, ""); - return err; - } -} -exports.PythonEvaluator = PythonEvaluator; -PythonEvaluator.identifier = "6q3co7"; -PythonEvaluator.areplPythonBackendFolderPath = __dirname + '/python/'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/arepl-backend/index.js.map b/node_modules/arepl-backend/index.js.map deleted file mode 100644 index 33caec7..0000000 --- a/node_modules/arepl-backend/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAiD;AAsDjD,MAAa,eAAe;IAuB3B;;;OAGG;IACH,YAAoB,UAAmB,EAAE;QAArB,YAAO,GAAP,OAAO,CAAc;QAtBtC;;WAEG;QACH,cAAS,GAAG,KAAK,CAAA;QAEjB;;WAEG;QACH,YAAO,GAAG,KAAK,CAAA;QAEf,eAAU,GAAG,KAAK,CAAA;QA+MrB;;;;WAIG;QACH,aAAQ,GAAG,CAAC;YACX,IAAI,KAAK,GAAO,CAAC,CAAC;YAClB,OAAO,UAAS,QAAQ,EAAE,EAAU,EAAE,GAAG,IAAW;gBACnD,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACxC,CAAC,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;QA5MJ,IAAG,OAAO,CAAC,QAAQ,IAAI,QAAQ,EAAC;YAC/B,kCAAkC;YAClC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACjE;QAED,+EAA+E;QAC/E,sEAAsE;QACtE,IAAG,CAAC,OAAO,CAAC,aAAa;YAAE,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,CAAA;QAC9D,IAAG,CAAC,OAAO,CAAC,UAAU;YAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,0BAAW,CAAC,iBAAiB,CAAA;QAC/E,IAAG,CAAC,OAAO,CAAC,UAAU;YAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,eAAe,CAAC,4BAA4B,CAAA;IAC/F,CAAC;IAGD;;OAEG;IACH,QAAQ,CAAC,IAAa;QACrB,IAAG,IAAI,CAAC,SAAS;YAAE,OAAM;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IACxC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,OAAc;QACvB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,QAAQ,GAAC,GAAE,EAAE,GAAC,CAAC;QAEtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;QAEvB,gCAAgC;QAChC,0DAA0D;QAC1D,iEAAiE;QACjE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAC,GAAE,EAAE;YACvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;YACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;YACtB,IAAI,CAAC,KAAK,EAAE,CAAA;YACZ,QAAQ,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED;;;OAGG;IACH,IAAI;QACH,sCAAsC;QACtC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAA;QAChD,IAAG,IAAI,CAAC,OAAO;YAAE,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;;YAClD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;QAE3B,UAAU,CAAC,GAAE,EAAE;YACd,IAAG,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAC;gBACnC,4CAA4C;gBAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;gBACzC,IAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAC;oBACnC,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAA;iBAC5D;;oBACI,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;aAC3B;QACF,CAAC,EAAE,EAAE,CAAC,CAAA;IACP,CAAC;IAED;;OAEG;IACH,KAAK;QACJ,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,0BAAW,CAAC,2BAA2B,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QACzE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE;YACpC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAC,EAAE;YAChC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACpB,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,GAAiB,IAAE,CAAC;IAE7B;;;;OAIG;IACH,OAAO,CAAC,GAAW,IAAE,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,GAAW,IAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,OAAc;QAC1B,IAAI,QAAQ,GAAgB;YAC3B,SAAS,EAAC,IAAI;YACd,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACR,QAAQ,EAAC,CAAC;YACV,SAAS,EAAC,CAAC;YACpB,WAAW,EAAC,CAAC;YACb,aAAa,EAAC,EAAE;YAChB,MAAM,EAAC,EAAE;YACT,MAAM,EAAC,CAAC,CAAC;YACT,IAAI,EAAC,IAAI;SACT,CAAA;QAEK,gFAAgF;QAChF,IAAG,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,UAAU,CAAC,EAAC;YACvD,IAAI;gBACH,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,EAAC,EAAE,CAAC,CAAA;gBACxD,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;gBAC9B,IAAI,CAAC,SAAS,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;gBAElC,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAC,IAAI,CAAA,CAAC,kBAAkB;gBAC7D,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,GAAC,IAAI,CAAA;gBAEhD,8EAA8E;gBAC9E,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;gBAC3D,0EAA0E;gBAC1E,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;gBAE7E,IAAG,QAAQ,CAAC,YAAY,EAAC;oBACxB,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;iBACzE;gBACD,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAC,IAAI,CAAC,SAAS,CAAA;gBAC9C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;aAEvB;YAAC,OAAO,GAAG,EAAE;gBACb,IAAI,GAAG,YAAY,KAAK,EAAC;oBACxB,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,GAAC,aAAa,GAAC,OAAO,CAAA;iBAC/C;gBACD,MAAM,GAAG,CAAA;aACT;SACD;aACS;YACA,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;SAC9B;IACF,CAAC;IAED;;;;OAIG;IACG,WAAW,CAAC,IAAW;;YAC5B,OAAO,0BAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;KAAA;IAED;;;;OAIG;IACG,eAAe,CAAC,QAAe;;YACpC,8DAA8D;YAC9D,8EAA8E;YAC9E,4CAA4C;YAE5C,OAAO,0BAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC9C,CAAC;KAAA;IAED;;;;OAIG;IACH,qBAAqB,CAAC,GAAU;QAC/B,qCAAqC;QACrC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAA;QAC7C,OAAO,GAAG,CAAA;IACX,CAAC;;AA5NF,0CA0OC;AAxO2B,0BAAU,GAAG,QAAQ,CAAA;AACxB,4CAA4B,GAAG,SAAS,GAAG,UAAU,CAAA"} \ No newline at end of file diff --git a/node_modules/arepl-backend/index.ts b/node_modules/arepl-backend/index.ts deleted file mode 100644 index 3cbed29..0000000 --- a/node_modules/arepl-backend/index.ts +++ /dev/null @@ -1,289 +0,0 @@ -import {PythonShell, Options} from 'python-shell' - -export interface FrameSummary { - _line: string - filename: string - lineno: number - locals: {} - name: string -} - -export interface UserError{ - __cause__: UserError - __context__: UserError - _str: string - cause: UserError - context: UserError - exc_traceback: {} - exc_type: { - "py/type": string - } - stack: { - "py/seq": FrameSummary[] - } - /* following for syntax errors only */ - filename?: string - lineno?: string - msg?: string - offset?: number - text?: string -} - -export interface ExecArgs{ - evalCode:string, - savedCode:string, - filePath:string, - usePreviousVariables?:boolean, - showGlobalVars?:boolean, - default_filter_vars:string[], - default_filter_types:string[] -} - -export interface PythonResult{ - userError: UserError, - userErrorMsg?: string, - userVariables:object, - execTime:number, - totalPyTime:number, - totalTime:number, - internalError:string, - caller: string, - lineno:number, - done: boolean -} - -export class PythonEvaluator{ - - private static readonly identifier = "6q3co7" - private static readonly areplPythonBackendFolderPath = __dirname + '/python/' - - /** - * whether python is busy executing inputted code - */ - executing = false - - /** - * whether python backend process is running / not running - */ - running = false - - restarting = false - private startTime:number - - /** - * an instance of python-shell. See https://github.com/extrabacon/python-shell - */ - pyshell:PythonShell - - /** - * starts python_evaluator.py - * @param options Process / Python options. If not specified sensible defaults are inferred. - */ - constructor(private options: Options = {}){ - - if(process.platform == "darwin"){ - //needed for Mac to prevent ENOENT - process.env.PATH = ["/usr/local/bin", process.env.PATH].join(":") - } - - // we want unbuffered mode by default because it can be frustrating to the user - // if they run the program but don't see any print output immediately. - if(!options.pythonOptions) this.options.pythonOptions = ['-u'] - if(!options.pythonPath) this.options.pythonPath = PythonShell.defaultPythonPath - if(!options.scriptPath) this.options.scriptPath = PythonEvaluator.areplPythonBackendFolderPath - } - - - /** - * does not do anything if program is currently executing code - */ - execCode(code:ExecArgs){ - if(this.executing) return - this.executing = true - this.startTime = Date.now() - this.pyshell.send(JSON.stringify(code)) - } - - /** - * @param {string} message - */ - sendStdin(message:string){ - this.pyshell.send(message) - } - - /** - * kills python process and restarts. Force-kills if necessary after 50ms. - * After process restarts the callback passed in is invoked - */ - restart(callback=()=>{}){ - - this.restarting = false - - // register callback for restart - // using childProcess callback instead of pyshell callback - // (pyshell callback only happens when process exits voluntarily) - this.pyshell.childProcess.on('exit',()=>{ - this.restarting = true - this.executing = false - this.start() - callback() - }) - - this.stop() - } - - /** - * kills python process. force-kills if necessary after 50ms. - * you can check python_evaluator.running to see if process is dead yet - */ - stop(){ - // pyshell has 50 ms to die gracefully - this.pyshell.childProcess.kill() - this.running = !this.pyshell.childProcess.killed - if(this.running) console.info("pyshell refused to die") - else this.executing = false - - setTimeout(()=>{ - if(this.running && !this.restarting){ - // murder the process with extreme prejudice - this.pyshell.childProcess.kill('SIGKILL') - if(this.pyshell.childProcess.killed){ - console.error("the python process simply cannot be killed!") - } - else this.executing = false - } - }, 50) - } - - /** - * starts python_evaluator.py. Will NOT WORK with python 2 - */ - start(){ - console.log("Starting Python...") - this.pyshell = new PythonShell('arepl_python_evaluator.py', this.options) - this.pyshell.on('message', message => { - this.handleResult(message) - }) - this.pyshell.on('stderr', (log)=>{ - this.onStderr(log) - }) - this.running = true - } - - /** - * Overwrite this with your own handler. - * is called when program fails or completes - */ - onResult(foo: PythonResult){} - - /** - * Overwrite this with your own handler. - * Is called when program prints - * @param {string} foo - */ - onPrint(foo: string){} - - /** - * Overwrite this with your own handler. - * Is called when program logs stderr - * @param {string} foo - */ - onStderr(foo: string){} - - /** - * handles pyshell results and calls onResult / onPrint - * @param {string} results - */ - handleResult(results:string) { - let pyResult:PythonResult = { - userError:null, - userErrorMsg: "", - userVariables: {}, - execTime:0, - totalTime:0, - totalPyTime:0, - internalError:"", - caller:"", - lineno:-1, - done:true - } - - //result should have identifier, otherwise it is just a printout from users code - if(results.startsWith(PythonEvaluator.identifier)){ - try { - results = results.replace(PythonEvaluator.identifier,"") - pyResult = JSON.parse(results) - this.executing = !pyResult['done'] - - pyResult.execTime = pyResult.execTime*1000 // convert into ms - pyResult.totalPyTime = pyResult.totalPyTime*1000 - - //@ts-ignore pyResult.userVariables is sent to as string, we convert to object - pyResult.userVariables = JSON.parse(pyResult.userVariables) - //@ts-ignore pyResult.userError is sent to as string, we convert to object - pyResult.userError = pyResult.userError ? JSON.parse(pyResult.userError) : {} - - if(pyResult.userErrorMsg){ - pyResult.userErrorMsg = this.formatPythonException(pyResult.userErrorMsg) - } - pyResult.totalTime = Date.now()-this.startTime - this.onResult(pyResult) - - } catch (err) { - if (err instanceof Error){ - err.message = err.message+"\nresults: "+results - } - throw err - } - } - else{ - this.onPrint(results) - } - } - - /** - * checks syntax without executing code - * @param {string} code - * @returns {Promise} rejects w/ stderr if syntax failure - */ - async checkSyntax(code:string){ - return PythonShell.checkSyntax(code); - } - - /** - * checks syntax without executing code - * @param {string} filePath - * @returns {Promise} rejects w/ stderr if syntax failure - */ - async checkSyntaxFile(filePath:string){ - // note that this should really be done in python_evaluator.py - // but communication with that happens through just one channel (stdin/stdout) - // so for now i prefer to keep this seperate - - return PythonShell.checkSyntaxFile(filePath); - } - - /** - * gets rid of unnecessary File "" message in exception - * @example err: - * Traceback (most recent call last):\n File "", line 1, in \nNameError: name \'x\' is not defined\n - */ - formatPythonException(err:string){ - //replace File "" (pointless) - err = err.replace(/File \"\", /g, "") - return err - } - - /** - * delays execution of function by ms milliseconds, resetting clock every time it is called - * Useful for real-time execution so execCode doesn't get called too often - * thanks to https://stackoverflow.com/a/1909508/6629672 - */ - debounce = (function(){ - let timer:any = 0; - return function(callback, ms: number, ...args: any[]){ - clearTimeout(timer); - timer = setTimeout(callback, ms, args); - }; - })(); -} diff --git a/node_modules/arepl-backend/package.json b/node_modules/arepl-backend/package.json deleted file mode 100644 index c205c54..0000000 --- a/node_modules/arepl-backend/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "arepl-backend@^1.3.8", - "_id": "arepl-backend@1.3.8", - "_inBundle": false, - "_integrity": "sha512-bqvN4gGA12v4BKaZY6FBt0AcWoiyQJZ/BwQd8yR8W2Pt1ivStquzd9HCKdcqt0F4GbTtqO1TGDmq0tcbfkNsPA==", - "_location": "/arepl-backend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "arepl-backend@^1.3.8", - "name": "arepl-backend", - "escapedName": "arepl-backend", - "rawSpec": "^1.3.8", - "saveSpec": null, - "fetchSpec": "^1.3.8" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/arepl-backend/-/arepl-backend-1.3.8.tgz", - "_shasum": "0d9dfdcc11073c262d167c272fa4a18e7f77d7fe", - "_spec": "arepl-backend@^1.3.8", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode\\src", - "author": { - "name": "Almenon" - }, - "bugs": { - "url": "https://github.com/Almenon/arepl-backend" - }, - "bundleDependencies": false, - "dependencies": { - "python-shell": "^1.0.8" - }, - "deprecated": false, - "description": "JS interface to python evaluator for AREPL", - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^10.5.2", - "documentation": "^12.1.4", - "mocha": "^5.2.0", - "mocha-appveyor-reporter": "^0.4.0", - "semantic-release": "^15.13.30", - "travis-deploy-once": "^5.0.9", - "ts-node": "^8.6.2", - "typescript": "^3.6.3" - }, - "files": [ - "python", - "!__pycache__", - "*.d.ts", - "*.js", - "*.js.map", - "*.ts" - ], - "homepage": "https://github.com/Almenon/arepl-backend#readme", - "keywords": [ - "IDE", - "python", - "real-time", - "AREPL" - ], - "license": "MIT", - "main": "index.js", - "name": "arepl-backend", - "repository": { - "type": "git", - "url": "git+https://github.com/Almenon/arepl-backend.git" - }, - "scripts": { - "appveyorTest": "mocha --ui tdd --reporter mocha-appveyor-reporter *.test.js --exit", - "compile": "tsc -watch -p ./", - "compileOnce": "tsc", - "declaration": "tsc --target es6 --declaration index.ts", - "document": "documentation readme index.js --section=API", - "prePublish": "npm run compileOnce && npm run test && npm run document", - "semantic-release": "semantic-release", - "test": "npm run compileOnce && mocha --ui tdd *.test.js --exit", - "travis-deploy-once": "travis-deploy-once" - }, - "version": "1.3.8" -} diff --git a/node_modules/arepl-backend/python/README.md b/node_modules/arepl-backend/python/README.md deleted file mode 100644 index 3a1f2ac..0000000 --- a/node_modules/arepl-backend/python/README.md +++ /dev/null @@ -1,7 +0,0 @@ -This folder contains the python sourcecode and tests for arepl. -It also has various python libraries (hardcoded so the user of arepl doesnt need to install anything) - -## Note on file naming convention -Files start with arepl to avoid conflicting with user files. -If they were named with something generic like "saved.py" then a user might have a file with the same name and that would conflict. -See https://github.com/Almenon/AREPL-backend/issues/113 \ No newline at end of file diff --git a/node_modules/arepl-backend/python/arepl_custom_handlers.py b/node_modules/arepl-backend/python/arepl_custom_handlers.py deleted file mode 100644 index 8e363ad..0000000 --- a/node_modules/arepl-backend/python/arepl_custom_handlers.py +++ /dev/null @@ -1,98 +0,0 @@ -import re -import datetime -import decimal -from arepl_jsonpickle.handlers import BaseHandler -from types import CodeType, FrameType, GeneratorType - -NOT_SERIALIZABLE_MESSAGE = "not serializable by arepl" - - -class BaseCustomHandler(BaseHandler): - """wrapper around BaseHandler for convenient unit testing""" - - def restore(self, obj): - """just for unit testing""" - return obj - - -class DatetimeHandler(BaseCustomHandler): - ### better represention of datetime, see https://github.com/jsonpickle/jsonpickle/issues/109 ### - def flatten(self, obj, data): - x = {"date/time": str(obj)} - return x - - -class DecimalHandler(BaseCustomHandler): - def flatten(self, obj, data): - x = float(obj) - return x - - -class RegexMatchHandler(BaseCustomHandler): - ### better represention of datetime, see https://github.com/jsonpickle/jsonpickle/issues/109 ### - def flatten(self, obj, data): - return { - "py/object": "_sre.SRE_Match", - "match": obj.group(0), - "groups": obj.groups(), - "span": obj.span(), - } - - -class FrameHandler(BaseCustomHandler): - ### better represention of frame, see https://github.com/Almenon/AREPL-backend/issues/26 ### - def flatten(self, obj, data): - if obj is None: - return None - return { - "py/object": "types.FrameType", - "f_back": self.flatten(obj.f_back, data), - "f_builtins": NOT_SERIALIZABLE_MESSAGE, - "f_code": CodeHandler(None).flatten(obj.f_code, data), - "f_globals": NOT_SERIALIZABLE_MESSAGE, - "f_lasti": obj.f_lasti, - "f_lineno": obj.f_lineno, - "f_locals": NOT_SERIALIZABLE_MESSAGE, - } - - -class CodeHandler(BaseCustomHandler): - ### better represention of frame, see https://github.com/Almenon/AREPL-backend/issues/26 ### - def flatten(self, obj, data): - return { - "co_argcount": obj.co_argcount, - "co_code": NOT_SERIALIZABLE_MESSAGE, - "co_cellvars": obj.co_cellvars, - "co_consts": NOT_SERIALIZABLE_MESSAGE, - "co_filename": obj.co_filename, - "co_firstlineno": obj.co_firstlineno, - "co_flags": obj.co_flags, - "co_lnotab": NOT_SERIALIZABLE_MESSAGE, - "co_freevars": NOT_SERIALIZABLE_MESSAGE, - "co_kwonlyargcount": obj.co_kwonlyargcount, - "co_name": obj.co_name, - "co_names": obj.co_names, - "co_nlocals": NOT_SERIALIZABLE_MESSAGE, - "co_stacksize": obj.co_stacksize, - "co_varnames": obj.co_varnames, - } - - -class GeneratorHandler(BaseCustomHandler): - ### to prevent freeze-up when picking infinite generators, see https://github.com/Almenon/AREPL-backend/issues/96 ### - def flatten(self, obj, data): - return { - "py/object": "builtins.generator", - } - - -handlers = [ - {"type": datetime.date, "handler": DatetimeHandler}, - {"type": datetime.time, "handler": DatetimeHandler}, - {"type": datetime.datetime, "handler": DatetimeHandler}, - {"type": type(re.search("", "")), "handler": RegexMatchHandler}, - {"type": FrameType, "handler": FrameHandler}, - {"type": CodeType, "handler": CodeHandler}, - {"type": decimal.Decimal, "handler": DecimalHandler}, - {"type": GeneratorType, "handler": GeneratorHandler}, -] diff --git a/node_modules/arepl-backend/python/arepl_dump.py b/node_modules/arepl-backend/python/arepl_dump.py deleted file mode 100644 index 80d7966..0000000 --- a/node_modules/arepl-backend/python/arepl_dump.py +++ /dev/null @@ -1,54 +0,0 @@ -import arepl_jsonpickle -import inspect -import json -from time import time -from typing import Any, List, Union -from arepl_python_evaluator import pickle_user_vars, ReturnInfo, print_output -from arepl_settings import get_settings - -context = {} - - -def dump(variable: Any = None, atCount: Union[int, List[int]] = 0): - """ - dumps specified var to arepl viewer or all vars of calling scope if unspecified - :param atCount: when to dump. ex: dump(,3) to dump vars at fourth iteration of loop. You can pass in a list of numbers to do multiple dumps. - """ - startTime = time() - - callingFrame = inspect.currentframe().f_back - - callerFile = callingFrame.f_code.co_filename - callerLine = callingFrame.f_lineno - caller = callingFrame.f_code.co_name - key = callerFile + caller + str(callerLine) - - count = 0 - - try: - count = context[key] + 1 - except KeyError: - pass - - context[key] = count - - if count == atCount or (type(atCount) is list and count in atCount): - if variable is None: - variableDict = callingFrame.f_locals - else: - variableDict = {"dump output": variable} - - variableJson = pickle_user_vars( - variableDict, get_settings().default_filter_vars, get_settings().default_filter_types - ) - my_return_info = ReturnInfo( - "", variableJson, None, time() - startTime, None, caller, callerLine, done=False, count=count - ) - - print_output(my_return_info) - - # we don't need to return anything for user, this is just to make testing easier - return my_return_info - - -# dump(5) for quick testing diff --git a/node_modules/arepl-backend/python/arepl_examples.py b/node_modules/arepl-backend/python/arepl_examples.py deleted file mode 100644 index b39dad6..0000000 --- a/node_modules/arepl-backend/python/arepl_examples.py +++ /dev/null @@ -1,392 +0,0 @@ -############################################## -# SIMPLE CODE W/ IMPORT -############################################## - -import json - -x = 1 -x = x+3 -y = "a" + str(3) -z = [x*x for char in y] -zy = json.dumps(z) - -############################################## -# RANDOM STUFF -############################################## - -def stair_case(c): - print(c) - if len(c) < 100: - return stair_case("o" + c) - else: return c - -# can you adjust stair case to show a pyramid? - -def line(start, length): - # find middle - print(start) - if len(start) > length: - return start - else: - # play around with multiplier to adjust angle! - return line(" "*2 + start, length) - -line("a",50) - -############################################## -# SIMPLE CLASS -############################################## - -class BankAccount(object): - def __init__(self, initial_balance=0): - self.balance = initial_balance - def deposit(self, amount): - self.balance += amount - def withdraw(self, amount): - self.balance -= amount - def overdrawn(self): - return self.balance < 0 -my_account = BankAccount(15) -my_account.withdraw(5) -my_account.deposit(100) -my_account.withdraw(2000) -x = my_account.overdrawn() - - -# -{ -# "BankAccount": -{ -# "py/type": "__builtin__.BankAccount" -# }, -# "my_account": -{ -# "py/object": "__builtin__.BankAccount", -# "balance": -1890 -# }, -# "x": true -# } - -############################################## -# PANDAS -############################################## - -import pandas as pd - -headers = ['Group', 'Element', 'Case', 'Score', 'Evaluation'] -data = [ - ['A', 1, 'x', 1.40, 0.59], - ['A', 1, 'y', 9.19, 0.52], - ['A', 2, 'x', 8.82, 0.80], - ['A', 2, 'y', 7.18, 0.41], - ['B', 1, 'x', 1.38, 0.22], - ['B', 1, 'y', 7.14, 0.10], - ['B', 2, 'x', 9.12, 0.28], - ['B', 2, 'y', 4.11, 0.97], -] -df = pd.DataFrame(data, columns=headers) - -result = ( - df.set_index(['Element', 'Case']) - .groupby('Group') - .agg({'Score': ['max', 'idxmax'], 'Evaluation': 'min'}) - .reset_index() -) -print(result) # print format is a bit wonky, but serviceable. - -# https://stackoverflow.com/questions/45133853/pandas-grouping-and-aggregation-with-multiple-functions - - - -############################################## -# SOCKETS (this behaves wierdly - maybe because it was meant for python 2?) -############################################## - - -import socket -import subprocess -import sys -from datetime import datetime - -# Clear the screen -subprocess.call('clear', shell=True) - -# Ask for input -remoteServer = raw_input("Enter a remote host to scan: ") -remoteServerIP = socket.gethostbyname(remoteServer) - -# Print a nice banner with information on which host we are about to scan -print("-" * 60) -print("Please wait, scanning remote host", remoteServerIP) -print("-" * 60) - -# Check what time the scan started -t1 = datetime.now() - -# Using the range function to specify ports (here it will scans all ports between 1 and 1024) - -# We also put in some error handling for catching errors - -try: - for port in range(1,1025): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - result = sock.connect_ex((remoteServerIP, port)) - if result == 0: - print("Port {}: Open".format(port)) - sock.close() - -except KeyboardInterrupt: - print("You pressed Ctrl+C") - sys.exit() - -except socket.gaierror: - print('Hostname could not be resolved. Exiting') - sys.exit() - -except socket.error: - print("Couldn't connect to server") - sys.exit() - -# Checking the time again -t2 = datetime.now() - -# Calculates the difference of time, to see how long it took to run the script -total = t2 - t1 - - -############################################## -# NEURAL NETWORK -############################################## - -# A Very Simple Neural Network in Python 3 with Numpy, Part 2 -# Alan Richmond @ Python3.codes -import numpy as np -import matplotlib.pyplot as plt -import math, time - -epochs = 3000 -batchSize = 4 -#activation = 'sigmoid' -activation = 'tanh' -#activation = 'ReLU' - -def f(x): return np.sin(x) - -minx, maxx = 0, 6.28 -miny, maxy = -1, 1 -numx = int(maxx * 5 + 1) -inputLayerSize, hiddenLayerSize, outputLayerSize = 2, 5, 1 - -funcs = {'sigmoid': (lambda x: 1/(1 + np.exp(-x)), - lambda x: x * (1 - x), (0, 1), .45), - 'tanh': (lambda x: np.tanh(x), - lambda x: 1 - x**2, (0, -1), 0.005), - 'ReLU': (lambda x: x * (x > 0), - lambda x: x > 0, (0, maxx), 0.0005), - } -(activate, activatePrime, (mina, maxa), L) = funcs[activation] - -X = x = np.linspace(minx, maxx, num=numx) -X.shape = (numx, 1) -Y = y = f(X) -Y = (Y - miny)*(maxa - mina)/(maxy - miny) + mina # normalise into activation - -# add a bias unit to the input layer -X = np.concatenate((np.atleast_2d(np.ones(X.shape[0])).T, X), axis=1) - -# Random initial weights -r0 = math.sqrt(2.0/(inputLayerSize)) -r1 = math.sqrt(2.0/(hiddenLayerSize)) -Wh = np.random.uniform(size=(inputLayerSize, hiddenLayerSize),low=-r0,high=r0) -Wz = np.random.uniform(size=(hiddenLayerSize,outputLayerSize),low=-r1,high=r1) - -def next_batch(X, Y): - for i in np.arange(0, X.shape[0], batchSize): - yield (X[i:i + batchSize], Y[i:i + batchSize]) - -start = time.time() -lossHistory = [] - -for i in range(epochs): # Training: - epochLoss = [] - - for (Xb, Yb) in next_batch(X, Y): - - H = activate(np.dot(Xb, Wh)) # hidden layer results - Z = activate(np.dot(H, Wz)) # output layer results - E = Yb - Z # how much we missed (error) - epochLoss.append(np.sum(E**2)) - - dZ = E * activatePrime(Z) # delta Z - dH = dZ.dot(Wz.T) * activatePrime(H) # delta H - Wz += H.T.dot(dZ) * L # update output layer weights - Wh += Xb.T.dot(dH) * L # update hidden layer weights - - mse = np.average(epochLoss) - lossHistory.append(mse) - -X[:, 1] += maxx/(numx-1)/2 -H = activate(np.dot(X, Wh)) -Z = activate(np.dot(H, Wz)) -Z = ((miny - maxy) * Z - maxa * miny + maxy * mina)/(mina - maxa) -Y = y - -plt.figure(figsize=(12, 9)) -plt.subplot(311) -plt.plot(lossHistory) -plt.subplot(312) -plt.plot(H, '-*') -plt.subplot(313) -plt.plot(x, Y, 'ro') # training data -plt.plot(X[:, 1], Z, 'bo') # learned -plt.show() - - - -############################################## -# CSV -############################################## - - - -import csv -import math - -# write stocks data as comma-separated values -with open('stocks.csv', 'w') as f: - writer = csv.writer(f) - writer.writerows([ - ('GOOG', 'Google, Inc.', 505.24, 0.47, 0.09), - ('YHOO', 'Yahoo! Inc.', 27.38, 0.33, 1.22), - ('CNET', 'CNET Networks, Inc.', 8.62, -0.13, -1.49) - ]) - -# read stocks data, print status messages -with open('stocks.csv', 'r') as f: - stocks = csv.reader(f) - status_labels = {-1: 'down', 0: 'unchanged', 1: 'up'} - for ticker, name, price, change, pct in stocks: - status = status_labels[math.floor(float(change))] - print('%s is %s (%s%%)' % (name, status, pct)) - - -############################################## -# MULTI-PENDULUM HARMONIC GRAPH -############################################## - - -""" Multi-pendulum Harmonograph simulator using numpy and matplotlib - - You can specify any number of pendulums npend > 0; this number also sets - the number of frequencies available. The sine wave parameters are - a: amplitude, a random float in the range 0 to 1; - f: frequency, a random near-integer in the range 1 to npend - p: phase, a random float in the range 0 to 2pi - - Copyright 2017 Alan Richmond @ Python3.codes - The MIT License https://opensource.org/licenses/MIT -""" -import random as r -import matplotlib.pyplot as plt -from numpy import arange, sin, cos, exp, pi -plt.rcParams["figure.figsize"] = 8,6 # size of plot in inches - -mf = npend = 4 # # of pendulums & maximum frequency -sigma = 0.005 # frequency spread (from integer) -step = 0.01 # step size -steps = 10000 # # of steps -linew = 5 # line width -def xprint(name, value): # convenience function to print params. - print(name+' '.join(['%.4f' % x for x in value])) - -t = arange(steps)*step # time axis -d = 1 - arange(steps)/steps # decay vector - -n = 1 # Number of pendulums (%d)(0=exit): "%npend) -if n != '': npend = int(n) -n = 1 # Deviation from integer freq.(%f): "%sigma) -if n != '': sigma = float(n) -ax = [r.uniform(0, 1) for i in range(npend)] -ay = [r.uniform(0, 1) for i in range(npend)] -px = [r.uniform(0, 2*pi) for i in range(npend)] -py = [r.uniform(0, 2*pi) for i in range(npend)] -fx = [r.randint(1, mf) + r.gauss(0, sigma) for i in range(npend)] -fy = [r.randint(1, mf) + r.gauss(0, sigma) for i in range(npend)] -xprint('ax = ', ax); xprint('fx = ', fx); xprint('px = ', px) -xprint('ay = ', ay); xprint('fy = ', fy); xprint('py = ', py) -x = y = 0 -for i in range(npend): - x += d * (ax[i] * sin(t * fx[i] + px[i])) - y += d * (ay[i] * sin(t * fy[i] + py[i])) -plt.figure(facecolor = 'white') -plt.plot(x, y, 'k', linewidth=1.5) -plt.axis('off') -plt.subplots_adjust(left=0.0, right=1.0, top=1.0, bottom=0.0) -plt.show(block=True) - -################################################ -# various types -################################################ - -import math # doesn't show up (good, we dont want modules to show) -a = 1 -b = 1.1 -c = float('nan') -d = float('infinity') -e = float('-infinity') -f = 'é' #doesnt render properly :( -g = {} -h = [] -i = [[[]]] -j = lambda x: x+1 # doesnt show up??? -def k(x): - return x+1 -class l(): - def __init__(self,x): - self.x = x -m = l(5) -n = False -with open("C:\\dev\\t.html") as f: - o = f - -################################################ -# REGEX -################################################ - -import re - -print(dir(re)) - -pattern = re.compile("(d)(?Po)f(g)") - -search = pattern.search("ffdofg") -match = pattern.match("dofg") -findAll = pattern.findall("dofg dofg") -sub = pattern.sub('g','dofgoo') -split = pattern.split("h dofg g") -noMatch = pattern.search('a') - -groups = search.groupdict() -span = search.span() - - -################################################ -# TURTLE -################################################ - -import turtle -import random - -painter = turtle.Turtle() - -painter.speed(0) - -def circleThingy(num,dis): - for i in range(num): - painter.forward(dis) - painter.left(dis+50) - -painter.pencolor("red") -circleThingy(20,50) -painter.pencolor("blue") -circleThingy(20,500) - - -turtle.done() \ No newline at end of file diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/__init__.py b/node_modules/arepl-backend/python/arepl_jsonpickle/__init__.py deleted file mode 100644 index 7b5e5aa..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008 John Paulett (john -at- paulett.org) -# Copyright (C) 2009, 2011, 2013 David Aguilar (davvid -at- gmail.com) -# All rights reserved. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. - -"""Python library for serializing any arbitrary object graph into JSON. - -.. warning:: - - jsonpickle can execute arbitrary Python code. Do not load jsonpickles from - untrusted / unauthenticated sources. - -jsonpickle can take almost any Python object and turn the object into JSON. -Additionally, it can reconstitute the object back into Python. - -The object must be accessible globally via a module and must -inherit from object (AKA new-style classes). - -Create an object:: - - class Thing(object): - def __init__(self, name): - self.name = name - - obj = Thing('Awesome') - -Use jsonpickle to transform the object into a JSON string:: - - import arepl_jsonpickle - frozen = jsonpickle.encode(obj) - -Use jsonpickle to recreate a Python object from a JSON string:: - - thawed = jsonpickle.decode(frozen) - -The new object has the same type and data, but essentially is now a copy of -the original. - -.. code-block:: python - - assert obj.name == thawed.name - -If you will never need to load (regenerate the Python class from JSON), you can -pass in the keyword unpicklable=False to prevent extra information from being -added to JSON:: - - oneway = jsonpickle.encode(obj, unpicklable=False) - result = jsonpickle.decode(oneway) - assert obj.name == result['name'] == 'Awesome' - -""" -from __future__ import absolute_import, division, unicode_literals - -from .backend import json -from .pickler import encode -from .unpickler import decode - -# Export other names not in __all__ -from .backend import JSONBackend # noqa: F401 -from .version import __version__ # noqa: F401 -from .handlers import register # noqa: F401 -from .handlers import unregister # noqa: F401 -from .pickler import Pickler # noqa: F401 -from .unpickler import Unpickler # noqa: F401 - -__all__ = ('encode', 'decode') - -# register built-in handlers -__import__('arepl_jsonpickle.handlers', level=0) - -# Export specific JSONPluginMgr methods into the jsonpickle namespace -set_preferred_backend = json.set_preferred_backend -set_decoder_options = json.set_decoder_options -set_encoder_options = json.set_encoder_options -load_backend = json.load_backend -remove_backend = json.remove_backend -enable_fallthrough = json.enable_fallthrough - -# json.load(), loads(), dump(), dumps() compatibility -dumps = encode -loads = decode diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/backend.py b/node_modules/arepl-backend/python/arepl_jsonpickle/backend.py deleted file mode 100644 index 5c232ef..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/backend.py +++ /dev/null @@ -1,281 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from .compat import string_types - - -class JSONBackend(object): - """Manages encoding and decoding using various backends. - - It tries these modules in this order: - simplejson, json, demjson - - simplejson is a fast and popular backend and is tried first. - json comes with Python and is tried second. - demjson is the most permissive backend and is tried last. - - """ - def __init__(self, fallthrough=True): - # Whether we should fallthrough to the next backend - self._fallthrough = fallthrough - # The names of backends that have been successfully imported - self._backend_names = [] - - # A dictionary mapping backend names to encode/decode functions - self._encoders = {} - self._decoders = {} - - # Options to pass to specific encoders - self._encoder_options = {} - - # Options to pass to specific decoders - self._decoder_options = {} - - # The exception class that is thrown when a decoding error occurs - self._decoder_exceptions = {} - - # Whether we've loaded any backends successfully - self._verified = False - - self.load_backend('simplejson') - self.load_backend('json') - self.load_backend('demjson', 'encode', 'decode', 'JSONDecodeError') - self.load_backend('jsonlib', 'write', 'read', 'ReadError') - self.load_backend('yajl') - self.load_backend('ujson') - - # Defaults for various encoders - json_opts = ((), {'sort_keys': True}) - self._encoder_options = { - 'ujson': ((), {'sort_keys': True, 'escape_forward_slashes': False}), - 'json': json_opts, - 'simplejson': json_opts, - 'django.util.simplejson': json_opts, - } - - def _verify(self): - """Ensures that we've loaded at least one JSON backend.""" - if self._verified: - return - raise AssertionError('jsonpickle requires at least one of the ' - 'following:\n' - ' python2.6, simplejson, or demjson') - - def enable_fallthrough(self, enable): - """ - Disable jsonpickle's fallthrough-on-error behavior - - By default, jsonpickle tries the next backend when decoding or - encoding using a backend fails. - - This can make it difficult to force jsonpickle to use a specific - backend, and catch errors, because the error will be suppressed and - may not be raised by the subsequent backend. - - Calling `enable_backend(False)` will make jsonpickle immediately - re-raise any exceptions raised by the backends. - - """ - self._fallthrough = enable - - def load_backend(self, name, - dumps='dumps', loads='loads', loads_exc=ValueError): - - """Load a JSON backend by name. - - This method loads a backend and sets up references to that - backend's loads/dumps functions and exception classes. - - :param dumps: is the name of the backend's encode method. - The method should take an object and return a string. - Defaults to 'dumps'. - :param loads: names the backend's method for the reverse - operation -- returning a Python object from a string. - :param loads_exc: can be either the name of the exception class - used to denote decoding errors, or it can be a direct reference - to the appropriate exception class itself. If it is a name, - then the assumption is that an exception class of that name - can be found in the backend module's namespace. - :param load: names the backend's 'load' method. - :param dump: names the backend's 'dump' method. - :rtype bool: True on success, False if the backend could not be loaded. - - """ - try: - # Load the JSON backend - mod = __import__(name) - except ImportError: - return False - - # Handle submodules, e.g. django.utils.simplejson - try: - for attr in name.split('.')[1:]: - mod = getattr(mod, attr) - except AttributeError: - return False - - if (not self._store(self._encoders, name, mod, dumps) or - not self._store(self._decoders, name, mod, loads)): - return False - - if isinstance(loads_exc, string_types): - # This backend's decoder exception is part of the backend - if not self._store(self._decoder_exceptions, name, mod, loads_exc): - return False - else: - # simplejson uses ValueError - self._decoder_exceptions[name] = loads_exc - - # Setup the default args and kwargs for this encoder/decoder - self._encoder_options.setdefault(name, ([], {})) - self._decoder_options.setdefault(name, ([], {})) - - # Add this backend to the list of candidate backends - self._backend_names.append(name) - - # Indicate that we successfully loaded a JSON backend - self._verified = True - return True - - def remove_backend(self, name): - """Remove all entries for a particular backend.""" - self._encoders.pop(name, None) - self._decoders.pop(name, None) - self._decoder_exceptions.pop(name, None) - self._decoder_options.pop(name, None) - self._encoder_options.pop(name, None) - if name in self._backend_names: - self._backend_names.remove(name) - self._verified = bool(self._backend_names) - - def encode(self, obj): - """ - Attempt to encode an object into JSON. - - This tries the loaded backends in order and passes along the last - exception if no backend is able to encode the object. - - """ - self._verify() - - if not self._fallthrough: - name = self._backend_names[0] - return self.backend_encode(name, obj) - - for idx, name in enumerate(self._backend_names): - try: - return self.backend_encode(name, obj) - except Exception as e: - if idx == len(self._backend_names) - 1: - raise e - # def dumps - dumps = encode - - def backend_encode(self, name, obj): - optargs, optkwargs = self._encoder_options.get(name, ([], {})) - encoder_kwargs = optkwargs.copy() - encoder_args = (obj,) + tuple(optargs) - return self._encoders[name](*encoder_args, **encoder_kwargs) - - def decode(self, string): - """ - Attempt to decode an object from a JSON string. - - This tries the loaded backends in order and passes along the last - exception if no backends are able to decode the string. - - """ - self._verify() - - if not self._fallthrough: - name = self._backend_names[0] - return self.backend_decode(name, string) - - for idx, name in enumerate(self._backend_names): - try: - return self.backend_decode(name, string) - except self._decoder_exceptions[name] as e: - if idx == len(self._backend_names) - 1: - raise e - else: - pass # and try a more forgiving encoder, e.g. demjson - # def loads - loads = decode - - def backend_decode(self, name, string): - optargs, optkwargs = self._decoder_options.get(name, ((), {})) - decoder_kwargs = optkwargs.copy() - return self._decoders[name](string, *optargs, **decoder_kwargs) - - def set_preferred_backend(self, name): - """ - Set the preferred json backend. - - If a preferred backend is set then jsonpickle tries to use it - before any other backend. - - For example:: - - set_preferred_backend('simplejson') - - If the backend is not one of the built-in jsonpickle backends - (json/simplejson, or demjson) then you must load the backend - prior to calling set_preferred_backend. - - AssertionError is raised if the backend has not been loaded. - - """ - if name in self._backend_names: - self._backend_names.remove(name) - self._backend_names.insert(0, name) - else: - errmsg = 'The "%s" backend has not been loaded.' % name - raise AssertionError(errmsg) - - def set_encoder_options(self, name, *args, **kwargs): - """ - Associate encoder-specific options with an encoder. - - After calling set_encoder_options, any calls to jsonpickle's - encode method will pass the supplied args and kwargs along to - the appropriate backend's encode method. - - For example:: - - set_encoder_options('simplejson', sort_keys=True, indent=4) - set_encoder_options('demjson', compactly=False) - - See the appropriate encoder's documentation for details about - the supported arguments and keyword arguments. - - """ - self._encoder_options[name] = (args, kwargs) - - def set_decoder_options(self, name, *args, **kwargs): - """ - Associate decoder-specific options with a decoder. - - After calling set_decoder_options, any calls to jsonpickle's - decode method will pass the supplied args and kwargs along to - the appropriate backend's decode method. - - For example:: - - set_decoder_options('simplejson', encoding='utf8', cls=JSONDecoder) - set_decoder_options('demjson', strict=True) - - See the appropriate decoder's documentation for details about - the supported arguments and keyword arguments. - - """ - self._decoder_options[name] = (args, kwargs) - - def _store(self, dct, backend, obj, name): - try: - dct[backend] = getattr(obj, name) - except AttributeError: - self.remove_backend(backend) - return False - return True - - -json = JSONBackend() diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/compat.py b/node_modules/arepl-backend/python/arepl_jsonpickle/compat.py deleted file mode 100644 index e44494f..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/compat.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals -import sys -import types -import base64 - -PY_MAJOR = sys.version_info[0] -PY2 = PY_MAJOR == 2 -PY3 = PY_MAJOR == 3 - -class_types = (type,) -iterator_types = (type(iter('')),) - -if PY3: - import builtins - import queue - from base64 import encodebytes, decodebytes - from collections.abc import Iterator as abc_iterator - string_types = (str,) - numeric_types = (int, float) - ustr = str -else: - from collections import Iterator as abc_iterator # noqa - builtins = __import__('__builtin__') - class_types += (types.ClassType,) - encodebytes = base64.encodestring - decodebytes = base64.decodestring - string_types = (builtins.basestring,) - numeric_types = (int, float, builtins.long) - queue = __import__('Queue') - ustr = builtins.unicode - - -def iterator(class_): - if PY2 and hasattr(class_, '__next__'): - class_.next = class_.__next__ - return class_ diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/ext/__init__.py b/node_modules/arepl-backend/python/arepl_jsonpickle/ext/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/ext/numpy.py b/node_modules/arepl-backend/python/arepl_jsonpickle/ext/numpy.py deleted file mode 100644 index 69129bd..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/ext/numpy.py +++ /dev/null @@ -1,345 +0,0 @@ -from __future__ import absolute_import -import ast -import sys -import zlib -import warnings -import json - -import numpy as np - -from ..handlers import BaseHandler, register, unregister -from ..compat import numeric_types -from ..util import b64decode, b64encode -from .. import compat - - -__all__ = ['register_handlers', 'unregister_handlers'] - -native_byteorder = '<' if sys.byteorder == 'little' else '>' - - -def get_byteorder(arr): - """translate equals sign to native order""" - byteorder = arr.dtype.byteorder - return native_byteorder if byteorder == '=' else byteorder - - -class NumpyBaseHandler(BaseHandler): - - def flatten_dtype(self, dtype, data): - if hasattr(dtype, 'tostring'): - data['dtype'] = dtype.tostring() - else: - dtype = compat.ustr(dtype) - prefix = '(numpy.record, ' - if dtype.startswith(prefix): - dtype = dtype[len(prefix):-1] - data['dtype'] = dtype - - def restore_dtype(self, data): - dtype = data['dtype'] - if dtype.startswith(('{', '[')): - dtype = ast.literal_eval(dtype) - return np.dtype(dtype) - - -class NumpyDTypeHandler(NumpyBaseHandler): - - def flatten(self, obj, data): - self.flatten_dtype(obj, data) - return data - - def restore(self, data): - return self.restore_dtype(data) - - -class NumpyGenericHandler(NumpyBaseHandler): - - def flatten(self, obj, data): - self.flatten_dtype(obj.dtype.newbyteorder('N'), data) - data['value'] = self.context.flatten(obj.tolist(), reset=False) - return data - - def restore(self, data): - value = self.context.restore(data['value'], reset=False) - return self.restore_dtype(data).type(value) - - -class NumpyNDArrayHandler(NumpyBaseHandler): - """Stores arrays as text representation, without regard for views - """ - def flatten_flags(self, obj, data): - if obj.flags.writeable is False: - data['writeable'] = False - - def restore_flags(self, data, arr): - if not data.get('writeable', True): - arr.flags.writeable = False - - def flatten(self, obj, data): - self.flatten_dtype(obj.dtype.newbyteorder('N'), data) - self.flatten_flags(obj, data) - data['values'] = self.context.flatten(obj.tolist(), reset=False) - if 0 in obj.shape: - # add shape information explicitly as it cannot be - # inferred from an empty list - data['shape'] = obj.shape - return data - - def restore(self, data): - values = self.context.restore(data['values'], reset=False) - arr = np.array( - values, - dtype=self.restore_dtype(data), - order=data.get('order', 'C') - ) - shape = data.get('shape', None) - if shape is not None: - arr = arr.reshape(shape) - - self.restore_flags(data, arr) - return arr - - -class NumpyNDArrayHandlerBinary(NumpyNDArrayHandler): - """stores arrays with size greater than 'size_threshold' as - (optionally) compressed base64 - - Notes - ----- - This would be easier to implement using np.save/np.load, but - that would be less language-agnostic - """ - - def __init__(self, size_threshold=16, compression=zlib): - """ - :param size_threshold: nonnegative int or None - valid values for 'size_threshold' are all nonnegative - integers and None - if size_threshold is None, values are always stored as nested lists - :param compression: a compression module or None - valid values for 'compression' are {zlib, bz2, None} - if compresion is None, no compression is applied - """ - self.size_threshold = size_threshold - self.compression = compression - - def flatten_byteorder(self, obj, data): - byteorder = obj.dtype.byteorder - if byteorder != '|': - data['byteorder'] = get_byteorder(obj) - - def restore_byteorder(self, data, arr): - byteorder = data.get('byteorder', None) - if byteorder: - arr.dtype = arr.dtype.newbyteorder(byteorder) - - def flatten(self, obj, data): - """encode numpy to json""" - if self.size_threshold is None or self.size_threshold >= obj.size: - # encode as text - data = super(NumpyNDArrayHandlerBinary, self).flatten(obj, data) - else: - # encode as binary - if obj.dtype == np.object: - # There's a bug deep in the bowels of numpy that causes a - # segfault when round-tripping an ndarray of dtype object. - # E.g., the following will result in a segfault: - # import numpy as np - # arr = np.array([str(i) for i in range(3)], - # dtype=np.object) - # dtype = arr.dtype - # shape = arr.shape - # buf = arr.tobytes() - # del arr - # arr = np.ndarray(buffer=buf, dtype=dtype, - # shape=shape).copy() - # So, save as a binary-encoded list in this case - buf = json.dumps(obj.tolist()).encode() - elif hasattr(obj, 'tobytes'): - # numpy docstring is lacking as of 1.11.2, - # but this is the option we need - buf = obj.tobytes(order='a') - else: - # numpy < 1.9 compatibility - buf = obj.tostring(order='a') - if self.compression: - buf = self.compression.compress(buf) - data['values'] = b64encode(buf) - data['shape'] = obj.shape - self.flatten_dtype(obj.dtype.newbyteorder('N'), data) - self.flatten_byteorder(obj, data) - self.flatten_flags(obj, data) - - if not obj.flags.c_contiguous: - data['order'] = 'F' - - return data - - def restore(self, data): - """decode numpy from json""" - values = data['values'] - if isinstance(values, list): - # decode text representation - arr = super(NumpyNDArrayHandlerBinary, self).restore(data) - elif isinstance(values, numeric_types): - # single-value array - arr = np.array([values], dtype=self.restore_dtype(data)) - else: - # decode binary representation - dtype = self.restore_dtype(data) - buf = b64decode(values) - if self.compression: - buf = self.compression.decompress(buf) - # See note above about segfault bug for numpy dtype object. Those - # are saved as a list to work around that. - if dtype == np.object: - values = json.loads(buf.decode()) - arr = np.array(values, dtype=dtype, - order=data.get('order', 'C')) - shape = data.get('shape', None) - if shape is not None: - arr = arr.reshape(shape) - else: - arr = np.ndarray( - buffer=buf, - dtype=dtype, - shape=data.get('shape'), - order=data.get('order', 'C') - ).copy() # make a copy, to force the result to own the data - self.restore_byteorder(data, arr) - self.restore_flags(data, arr) - - return arr - - -class NumpyNDArrayHandlerView(NumpyNDArrayHandlerBinary): - """Pickles references inside ndarrays, or array-views - - Notes - ----- - The current implementation has some restrictions. - - 'base' arrays, or arrays which are viewed by other arrays, - must be f-or-c-contiguous. - This is not such a large restriction in practice, because all - numpy array creation is c-contiguous by default. - Relaxing this restriction would be nice though; especially if - it can be done without bloating the design too much. - - Furthermore, ndarrays which are views of array-like objects - implementing __array_interface__, - but which are not themselves nd-arrays, are deepcopied with - a warning (by default), - as we cannot guarantee whatever custom logic such classes - implement is correctly reproduced. - """ - def __init__(self, mode='warn', size_threshold=16, compression=zlib): - """ - :param mode: {'warn', 'raise', 'ignore'} - How to react when encountering array-like objects whos - references we cannot safely serialize - :param size_threshold: nonnegative int or None - valid values for 'size_threshold' are all nonnegative - integers and None - if size_threshold is None, values are always stored as nested lists - :param compression: a compression module or None - valid values for 'compression' are {zlib, bz2, None} - if compresion is None, no compression is applied - """ - super(NumpyNDArrayHandlerView, self).__init__( - size_threshold, compression) - self.mode = mode - - def flatten(self, obj, data): - """encode numpy to json""" - base = obj.base - if base is None and obj.flags.forc: - # store by value - data = super(NumpyNDArrayHandlerView, self).flatten(obj, data) - # ensure that views on arrays stored as text - # are interpreted correctly - if not obj.flags.c_contiguous: - data['order'] = 'F' - elif isinstance(base, np.ndarray) and base.flags.forc: - # store by reference - data['base'] = self.context.flatten(base, reset=False) - - offset = obj.ctypes.data - base.ctypes.data - if offset: - data['offset'] = offset - - if not obj.flags.c_contiguous: - data['strides'] = obj.strides - - data['shape'] = obj.shape - self.flatten_dtype(obj.dtype.newbyteorder('N'), data) - self.flatten_flags(obj, data) - - if get_byteorder(obj) != '|': - byteorder = ( - 'S' if get_byteorder(obj) != get_byteorder(base) else None) - if byteorder: - data['byteorder'] = byteorder - - if self.size_threshold is None or self.size_threshold >= obj.size: - # not used in restore since base is present, but - # include values for human-readability - super(NumpyNDArrayHandlerBinary, self).flatten(obj, data) - else: - # store a deepcopy or fail - if self.mode == 'warn': - msg = ( - "ndarray is defined by reference to an object " - "we do not know how to serialize. " - "A deep copy is serialized instead, breaking " - "memory aliasing." - ) - warnings.warn(msg) - elif self.mode == 'raise': - msg = ( - "ndarray is defined by reference to an object we do " - "not know how to serialize." - ) - raise ValueError(msg) - data = super(NumpyNDArrayHandlerView, self) \ - .flatten(obj.copy(), data) - - return data - - def restore(self, data): - """decode numpy from json""" - base = data.get('base', None) - if base is None: - # decode array with owndata=True - arr = super(NumpyNDArrayHandlerView, self).restore(data) - else: - # decode array view, which references the data of another array - base = self.context.restore(base, reset=False) - assert base.flags.forc, \ - "Current implementation assumes base is C or F contiguous" - - arr = np.ndarray( - buffer=base.data, - dtype=self.restore_dtype(data).newbyteorder( - data.get('byteorder', '|')), - shape=data.get('shape'), - offset=data.get('offset', 0), - strides=data.get('strides', None) - ) - - self.restore_flags(data, arr) - - return arr - - -def register_handlers(): - register(np.dtype, NumpyDTypeHandler, base=True) - register(np.generic, NumpyGenericHandler, base=True) - register(np.ndarray, NumpyNDArrayHandlerView(), base=True) - - -def unregister_handlers(): - unregister(np.dtype) - unregister(np.generic) - unregister(np.ndarray) diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/ext/pandas.py b/node_modules/arepl-backend/python/arepl_jsonpickle/ext/pandas.py deleted file mode 100644 index 9b893f9..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/ext/pandas.py +++ /dev/null @@ -1,227 +0,0 @@ -from __future__ import absolute_import - -import pandas as pd -from io import StringIO -import zlib - -from .. import encode, decode -from ..handlers import BaseHandler, register, unregister -from ..util import b64decode, b64encode -from .numpy import register_handlers as register_numpy_handlers -from .numpy import unregister_handlers as unregister_numpy_handlers - -__all__ = ['register_handlers', 'unregister_handlers'] - - -class PandasProcessor(object): - - def __init__(self, size_threshold=500, compression=zlib): - """ - :param size_threshold: nonnegative int or None - valid values for 'size_threshold' are all nonnegative - integers and None. If size_threshold is None, - dataframes are always stored as csv strings - :param compression: a compression module or None - valid values for 'compression' are {zlib, bz2, None} - if compresion is None, no compression is applied - """ - self.size_threshold = size_threshold - self.compression = compression - - def flatten_pandas(self, buf, data, meta=None): - if self.size_threshold is not None and len(buf) > self.size_threshold: - if self.compression: - buf = self.compression.compress(buf.encode()) - data['comp'] = True - data['values'] = b64encode(buf) - data['txt'] = False - else: - data['values'] = buf - data['txt'] = True - - data['meta'] = meta - return data - - def restore_pandas(self, data): - if data.get('txt', True): - # It's just text... - buf = data['values'] - else: - buf = b64decode(data['values']) - if data.get('comp', False): - buf = self.compression.decompress(buf).decode() - meta = data.get('meta', {}) - return (buf, meta) - - -def make_read_csv_params(meta): - meta_dtypes = meta.get('dtypes', {}) - - parse_dates = [] - converters = {} - dtype = {} - for k, v in meta_dtypes.items(): - if v.startswith('datetime'): - parse_dates.append(k) - elif v.startswith('complex'): - converters[k] = complex - else: - dtype[k] = v - - return dict(dtype=dtype, parse_dates=parse_dates, converters=converters) - - -class PandasDfHandler(BaseHandler): - pp = PandasProcessor() - - def flatten(self, obj, data): - dtype = obj.dtypes.to_dict() - - meta = {'dtypes': {k: str(dtype[k]) for k in dtype}, - 'index': encode(obj.index)} - - data = self.pp.flatten_pandas( - obj.reset_index(drop=True).to_csv(index=False), data, meta) - return data - - def restore(self, data): - csv, meta = self.pp.restore_pandas(data) - params = make_read_csv_params(meta) - df = pd.read_csv( - StringIO(csv), **params) if data['values'].strip() else pd.DataFrame() - df.set_index(decode(meta['index']), inplace=True) - return df - - -class PandasSeriesHandler(BaseHandler): - pp = PandasProcessor() - - def flatten(self, obj, data): - """Flatten the index and values for reconstruction""" - data['name'] = obj.name - # This relies on the numpy handlers for the inner guts. - data['index'] = self.context.flatten(obj.index, reset=False) - data['values'] = self.context.flatten(obj.values, reset=False) - return data - - def restore(self, data): - """Restore the flattened data""" - name = data['name'] - index = self.context.restore(data['index'], reset=False) - values = self.context.restore(data['values'], reset=False) - return pd.Series(values, index=index, name=name) - - -class PandasIndexHandler(BaseHandler): - - pp = PandasProcessor() - index_constructor = pd.Index - - def name_bundler(self, obj): - return {'name': obj.name} - - def flatten(self, obj, data): - name_bundle = self.name_bundler(obj) - meta = dict(dtype=str(obj.dtype), **name_bundle) - buf = encode(obj.tolist()) - data = self.pp.flatten_pandas(buf, data, meta) - return data - - def restore(self, data): - buf, meta = self.pp.restore_pandas(data) - dtype = meta.get('dtype', None) - name_bundle = {k: v for k, v in meta.items() if k in {'name', 'names'}} - idx = self.index_constructor(decode(buf), dtype=dtype, **name_bundle) - return idx - - -class PandasPeriodIndexHandler(PandasIndexHandler): - index_constructor = pd.PeriodIndex - - -class PandasMultiIndexHandler(PandasIndexHandler): - - def name_bundler(self, obj): - return {'names': obj.names} - - -class PandasTimestampHandler(BaseHandler): - pp = PandasProcessor() - - def flatten(self, obj, data): - meta = {'isoformat': obj.isoformat()} - buf = '' - data = self.pp.flatten_pandas(buf, data, meta) - return data - - def restore(self, data): - _, meta = self.pp.restore_pandas(data) - isoformat = meta['isoformat'] - obj = pd.Timestamp(isoformat) - return obj - - -class PandasPeriodHandler(BaseHandler): - pp = PandasProcessor() - - def flatten(self, obj, data): - meta = { - 'start_time': encode(obj.start_time), - 'freqstr': obj.freqstr, - } - buf = '' - data = self.pp.flatten_pandas(buf, data, meta) - return data - - def restore(self, data): - _, meta = self.pp.restore_pandas(data) - start_time = decode(meta['start_time']) - freqstr = meta['freqstr'] - obj = pd.Period(start_time, freqstr) - return obj - - -class PandasIntervalHandler(BaseHandler): - pp = PandasProcessor() - - def flatten(self, obj, data): - meta = { - 'left': encode(obj.left), - 'right': encode(obj.right), - 'closed': obj.closed - } - buf = '' - data = self.pp.flatten_pandas(buf, data, meta) - return data - - def restore(self, data): - _, meta = self.pp.restore_pandas(data) - left = decode(meta['left']) - right = decode(meta['right']) - closed = str(meta['closed']) - obj = pd.Interval(left, right, closed=closed) - return obj - - -def register_handlers(): - register_numpy_handlers() - register(pd.DataFrame, PandasDfHandler, base=True) - register(pd.Series, PandasSeriesHandler, base=True) - register(pd.Index, PandasIndexHandler, base=True) - register(pd.PeriodIndex, PandasPeriodIndexHandler, base=True) - register(pd.MultiIndex, PandasMultiIndexHandler, base=True) - register(pd.Timestamp, PandasTimestampHandler, base=True) - register(pd.Period, PandasPeriodHandler, base=True) - register(pd.Interval, PandasIntervalHandler, base=True) - - -def unregister_handlers(): - unregister_numpy_handlers() - unregister(pd.DataFrame) - unregister(pd.Series) - unregister(pd.Index) - unregister(pd.PeriodIndex) - unregister(pd.MultiIndex) - unregister(pd.Timestamp) - unregister(pd.Period) - unregister(pd.Interval) diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/handlers.py b/node_modules/arepl-backend/python/arepl_jsonpickle/handlers.py deleted file mode 100644 index 50bed7d..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/handlers.py +++ /dev/null @@ -1,237 +0,0 @@ -""" -Custom handlers may be created to handle other objects. Each custom handler -must derive from :class:`jsonpickle.handlers.BaseHandler` and -implement ``flatten`` and ``restore``. - -A handler can be bound to other types by calling -:func:`jsonpickle.handlers.register`. - -""" -from __future__ import absolute_import, division, unicode_literals -import copy -import datetime -import re -import uuid - -from . import compat -from . import util - - -class Registry(object): - - def __init__(self): - self._handlers = {} - self._base_handlers = {} - - def get(self, cls_or_name, default=None): - """ - :param cls_or_name: the type or its fully qualified name - :param default: default value, if a matching handler is not found - - Looks up a handler by type reference or its fully - qualified name. If a direct match - is not found, the search is performed over all - handlers registered with base=True. - """ - handler = self._handlers.get(cls_or_name) - # attempt to find a base class - if handler is None and util.is_type(cls_or_name): - for cls, base_handler in self._base_handlers.items(): - if issubclass(cls_or_name, cls): - return base_handler - return default if handler is None else handler - - def register(self, cls, handler=None, base=False): - """Register the a custom handler for a class - - :param cls: The custom object class to handle - :param handler: The custom handler class (if - None, a decorator wrapper is returned) - :param base: Indicates whether the handler should - be registered for all subclasses - - This function can be also used as a decorator - by omitting the `handler` argument:: - - @jsonpickle.handlers.register(Foo, base=True) - class FooHandler(jsonpickle.handlers.BaseHandler): - pass - - """ - if handler is None: - def _register(handler_cls): - self.register(cls, handler=handler_cls, base=base) - return handler_cls - return _register - if not util.is_type(cls): - raise TypeError('{!r} is not a class/type'.format(cls)) - # store both the name and the actual type for the ugly cases like - # _sre.SRE_Pattern that cannot be loaded back directly - self._handlers[util.importable_name(cls)] = \ - self._handlers[cls] = handler - if base: - # only store the actual type for subclass checking - self._base_handlers[cls] = handler - - def unregister(self, cls): - self._handlers.pop(cls, None) - self._handlers.pop(util.importable_name(cls), None) - self._base_handlers.pop(cls, None) - - -registry = Registry() -register = registry.register -unregister = registry.unregister -get = registry.get - - -class BaseHandler(object): - - def __init__(self, context): - """ - Initialize a new handler to handle a registered type. - - :Parameters: - - `context`: reference to pickler/unpickler - - """ - self.context = context - - def __call__(self, context): - """This permits registering either Handler instances or classes - - :Parameters: - - `context`: reference to pickler/unpickler - """ - self.context = context - return self - - def flatten(self, obj, data): - """ - Flatten `obj` into a json-friendly form and write result to `data`. - - :param object obj: The object to be serialized. - :param dict data: A partially filled dictionary which will contain the - json-friendly representation of `obj` once this method has - finished. - """ - raise NotImplementedError('You must implement flatten() in %s' % - self.__class__) - - def restore(self, obj): - """ - Restore an object of the registered type from the json-friendly - representation `obj` and return it. - """ - raise NotImplementedError('You must implement restore() in %s' % - self.__class__) - - @classmethod - def handles(self, cls): - """ - Register this handler for the given class. Suitable as a decorator, - e.g.:: - - @MyCustomHandler.handles - class MyCustomClass: - def __reduce__(self): - ... - """ - registry.register(cls, self) - return cls - - -class DatetimeHandler(BaseHandler): - - """Custom handler for datetime objects - - Datetime objects use __reduce__, and they generate binary strings encoding - the payload. This handler encodes that payload to reconstruct the - object. - - """ - def flatten(self, obj, data): - pickler = self.context - if not pickler.unpicklable: - return compat.ustr(obj) - cls, args = obj.__reduce__() - flatten = pickler.flatten - payload = util.b64encode(args[0]) - args = [payload] + [flatten(i, reset=False) for i in args[1:]] - data['__reduce__'] = (flatten(cls, reset=False), args) - return data - - def restore(self, data): - cls, args = data['__reduce__'] - unpickler = self.context - restore = unpickler.restore - cls = restore(cls, reset=False) - value = util.b64decode(args[0]) - params = (value,) + tuple([restore(i, reset=False) for i in args[1:]]) - return cls.__new__(cls, *params) - - -DatetimeHandler.handles(datetime.datetime) -DatetimeHandler.handles(datetime.date) -DatetimeHandler.handles(datetime.time) - - -class RegexHandler(BaseHandler): - """Flatten _sre.SRE_Pattern (compiled regex) objects""" - - def flatten(self, obj, data): - data['pattern'] = obj.pattern - return data - - def restore(self, data): - return re.compile(data['pattern']) - - -RegexHandler.handles(type(re.compile(''))) - - -class QueueHandler(BaseHandler): - """Opaquely serializes Queue objects - - Queues contains mutex and condition variables which cannot be serialized. - Construct a new Queue instance when restoring. - - """ - def flatten(self, obj, data): - return data - - def restore(self, data): - return compat.queue.Queue() - - -QueueHandler.handles(compat.queue.Queue) - - -class CloneFactory(object): - """Serialization proxy for collections.defaultdict's default_factory""" - - def __init__(self, exemplar): - self.exemplar = exemplar - - def __call__(self, clone=copy.copy): - """Create new instances by making copies of the provided exemplar""" - return clone(self.exemplar) - - def __repr__(self): - return ( - '' - .format(id(self), self.exemplar)) - - -class UUIDHandler(BaseHandler): - """Serialize uuid.UUID objects""" - - def flatten(self, obj, data): - data['hex'] = obj.hex - return data - - def restore(self, data): - return uuid.UUID(data['hex']) - - -UUIDHandler.handles(uuid.UUID) diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/pickler.py b/node_modules/arepl-backend/python/arepl_jsonpickle/pickler.py deleted file mode 100644 index 19d9983..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/pickler.py +++ /dev/null @@ -1,669 +0,0 @@ -# Copyright (C) 2008 John Paulett (john -at- paulett.org) -# Copyright (C) 2009-2018 David Aguilar (davvid -at- gmail.com) -# All rights reserved. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. -from __future__ import absolute_import, division, unicode_literals -import decimal -import warnings -import sys -import types -from itertools import chain, islice - -from . import compat -from . import util -from . import tags -from . import handlers -from .backend import json -from .compat import numeric_types, string_types, PY3, PY2 - - -def encode(value, - unpicklable=True, - make_refs=True, - keys=False, - max_depth=None, - reset=True, - backend=None, - warn=False, - context=None, - max_iter=None, - use_decimal=False, - numeric_keys=False, - use_base85=False, - fail_safe=None): - """Return a JSON formatted representation of value, a Python object. - - :param unpicklable: If set to False then the output will not contain the - information necessary to turn the JSON data back into Python objects, - but a simpler JSON stream is produced. - :param max_depth: If set to a non-negative integer then jsonpickle will - not recurse deeper than 'max_depth' steps into the object. Anything - deeper than 'max_depth' is represented using a Python repr() of the - object. - :param make_refs: If set to False jsonpickle's referencing support is - disabled. Objects that are id()-identical won't be preserved across - encode()/decode(), but the resulting JSON stream will be conceptually - simpler. jsonpickle detects cyclical objects and will break the cycle - by calling repr() instead of recursing when make_refs is set False. - :param keys: If set to True then jsonpickle will encode non-string - dictionary keys instead of coercing them into strings via `repr()`. - :param warn: If set to True then jsonpickle will warn when it - returns None for an object which it cannot pickle - (e.g. file descriptors). - :param max_iter: If set to a non-negative integer then jsonpickle will - consume at most `max_iter` items when pickling iterators. - :param use_decimal: If set to True jsonpickle will allow Decimal - instances to pass-through, with the assumption that the simplejson - backend will be used in `use_decimal` mode. In order to use this mode - you will need to configure simplejson:: - - jsonpickle.set_encoder_options('simplejson', - use_decimal=True, sort_keys=True) - jsonpickle.set_decoder_options('simplejson', - use_decimal=True) - jsonpickle.set_preferred_backend('simplejson') - - NOTE: A side-effect of the above settings is that float values will be - converted to Decimal when converting to json. - :param use_base85: - If possible, use base85 to encode binary data. Base85 bloats binary data - by 1/4 as opposed to base64, which expands it by 1/3. This argument is - ignored on Python 2 because it doesn't support it. - :param fail_safe: If set to a function exceptions are ignored when pickling - and if a exception happens the function is called and the return value - is used as the value for the object that caused the error - - >>> encode('my string') == '"my string"' - True - >>> encode(36) == '36' - True - >>> encode({'foo': True}) == '{"foo": true}' - True - >>> encode({'foo': [1, 2, [3, 4]]}, max_depth=1) - '{"foo": "[1, 2, [3, 4]]"}' - - """ - backend = backend or json - context = context or Pickler( - unpicklable=unpicklable, - make_refs=make_refs, - keys=keys, - backend=backend, - max_depth=max_depth, - warn=warn, - max_iter=max_iter, - numeric_keys=numeric_keys, - use_decimal=use_decimal, - use_base85=use_base85, - fail_safe=fail_safe) - return backend.encode(context.flatten(value, reset=reset)) - - -class Pickler(object): - - def __init__(self, - unpicklable=True, - make_refs=True, - max_depth=None, - backend=None, - keys=False, - warn=False, - max_iter=None, - numeric_keys=False, - use_decimal=False, - use_base85=False, - fail_safe=None): - self.unpicklable = unpicklable - self.make_refs = make_refs - self.backend = backend or json - self.keys = keys - self.warn = warn - self.numeric_keys = numeric_keys - self.use_base85 = use_base85 and (not PY2) - # The current recursion depth - self._depth = -1 - # The maximal recursion depth - self._max_depth = max_depth - # Maps id(obj) to reference IDs - self._objs = {} - # Avoids garbage collection - self._seen = [] - # maximum amount of items to take from a pickled iterator - self._max_iter = max_iter - # Whether to allow decimals to pass-through - self._use_decimal = use_decimal - - if self.use_base85: - self._bytes_tag = tags.B85 - self._bytes_encoder = util.b85encode - else: - self._bytes_tag = tags.B64 - self._bytes_encoder = util.b64encode - - # ignore exceptions - self.fail_safe = fail_safe - - def reset(self): - self._objs = {} - self._depth = -1 - self._seen = [] - - def _push(self): - """Steps down one level in the namespace. - """ - self._depth += 1 - - def _pop(self, value): - """Step up one level in the namespace and return the value. - If we're at the root, reset the pickler's state. - """ - self._depth -= 1 - if self._depth == -1: - self.reset() - return value - - def _log_ref(self, obj): - """ - Log a reference to an in-memory object. - Return True if this object is new and was assigned - a new ID. Otherwise return False. - """ - objid = id(obj) - is_new = objid not in self._objs - if is_new: - new_id = len(self._objs) - self._objs[objid] = new_id - return is_new - - def _mkref(self, obj): - """ - Log a reference to an in-memory object, and return - if that object should be considered newly logged. - """ - is_new = self._log_ref(obj) - # Pretend the object is new - pretend_new = not self.unpicklable or not self.make_refs - return pretend_new or is_new - - def _getref(self, obj): - return {tags.ID: self._objs.get(id(obj))} - - def flatten(self, obj, reset=True): - """Takes an object and returns a JSON-safe representation of it. - - Simply returns any of the basic builtin datatypes - - >>> p = Pickler() - >>> p.flatten('hello world') == 'hello world' - True - >>> p.flatten(49) - 49 - >>> p.flatten(350.0) - 350.0 - >>> p.flatten(True) - True - >>> p.flatten(False) - False - >>> r = p.flatten(None) - >>> r is None - True - >>> p.flatten(False) - False - >>> p.flatten([1, 2, 3, 4]) - [1, 2, 3, 4] - >>> p.flatten((1,2,))[tags.TUPLE] - [1, 2] - >>> p.flatten({'key': 'value'}) == {'key': 'value'} - True - """ - if reset: - self.reset() - return self._flatten(obj) - - def _flatten(self, obj): - - ######################################### - # if obj is nonrecursive return immediately - # for performance reasons we don't want to do recursive checks - if PY2 and isinstance(obj, types.FileType): - return self._flatten_file(obj) - - if util.is_bytes(obj): - return self._flatten_bytestring(obj) - - if util.is_primitive(obj): - return obj - - # Decimal is a primitive when use_decimal is True - if self._use_decimal and isinstance(obj, decimal.Decimal): - return obj - ######################################### - - self._push() - return self._pop(self._flatten_obj(obj)) - - def _max_reached(self): - return self._depth == self._max_depth - - def _flatten_obj(self, obj): - self._seen.append(obj) - - max_reached = self._max_reached() - - try: - - in_cycle = _in_cycle(obj, self._objs, max_reached, self.make_refs) - if in_cycle: - # break the cycle - flatten_func = repr - else: - flatten_func = self._get_flattener(obj) - - if flatten_func is None: - self._pickle_warning(obj) - return None - - return flatten_func(obj) - - except (KeyboardInterrupt, SystemExit) as e: - raise e - except Exception as e: - if self.fail_safe is None: - raise e - else: - return self.fail_safe(e) - - def _list_recurse(self, obj): - return [self._flatten(v) for v in obj] - - def _get_flattener(self, obj): - - list_recurse = self._list_recurse - - if util.is_list(obj): - if self._mkref(obj): - return list_recurse - else: - self._push() - return self._getref - - # We handle tuples and sets by encoding them in a "(tuple|set)dict" - if util.is_tuple(obj): - if not self.unpicklable: - return list_recurse - return lambda obj: {tags.TUPLE: [self._flatten(v) for v in obj]} - - if util.is_set(obj): - if not self.unpicklable: - return list_recurse - return lambda obj: {tags.SET: [self._flatten(v) for v in obj]} - - if util.is_dictionary(obj): - return self._flatten_dict_obj - - if util.is_type(obj): - return _mktyperef - - if util.is_object(obj): - return self._ref_obj_instance - - if util.is_module_function(obj): - return self._flatten_function - - # instance methods, lambdas, old style classes... - self._pickle_warning(obj) - return None - - def _ref_obj_instance(self, obj): - """Reference an existing object or flatten if new - """ - if self.unpicklable: - if self._mkref(obj): - # We've never seen this object so return its - # json representation. - return self._flatten_obj_instance(obj) - # We've seen this object before so place an object - # reference tag in the data. This avoids infinite recursion - # when processing cyclical objects. - return self._getref(obj) - else: - max_reached = self._max_reached() - in_cycle = _in_cycle(obj, self._objs, max_reached, False) - if in_cycle: - # A circular becomes None. - return None - - self._mkref(obj) - return self._flatten_obj_instance(obj) - - def _flatten_file(self, obj): - """ - Special case file objects - """ - assert not PY3 and isinstance(obj, types.FileType) - return None - - def _flatten_bytestring(self, obj): - if PY2: - try: - return obj.decode('utf-8') - except UnicodeDecodeError: - pass - return {self._bytes_tag: self._bytes_encoder(obj)} - - def _flatten_obj_instance(self, obj): - """Recursively flatten an instance and return a json-friendly dict - """ - data = {} - has_class = hasattr(obj, '__class__') - has_dict = hasattr(obj, '__dict__') - has_slots = not has_dict and hasattr(obj, '__slots__') - has_getnewargs = util.has_method(obj, '__getnewargs__') - has_getnewargs_ex = util.has_method(obj, '__getnewargs_ex__') - has_getinitargs = util.has_method(obj, '__getinitargs__') - has_reduce, has_reduce_ex = util.has_reduce(obj) - - # Support objects with __getstate__(); this ensures that - # both __setstate__() and __getstate__() are implemented - has_getstate = hasattr(obj, '__getstate__') - # not using has_method since __getstate__() is handled separately below - - if has_class: - cls = obj.__class__ - else: - cls = type(obj) - - # Check for a custom handler - class_name = util.importable_name(cls) - handler = handlers.get(cls, handlers.get(class_name)) - if handler is not None: - if self.unpicklable: - data[tags.OBJECT] = class_name - return handler(self).flatten(obj, data) - - reduce_val = None - - if self.unpicklable: - if has_reduce and not has_reduce_ex: - try: - reduce_val = obj.__reduce__() - except TypeError: - # A lot of builtin types have a reduce which - # just raises a TypeError - # we ignore those - pass - - # test for a reduce implementation, and redirect before - # doing anything else if that is what reduce requests - elif has_reduce_ex: - try: - # we're implementing protocol 2 - reduce_val = obj.__reduce_ex__(2) - except TypeError: - # A lot of builtin types have a reduce which - # just raises a TypeError - # we ignore those - pass - - if reduce_val and isinstance(reduce_val, string_types): - try: - varpath = iter(reduce_val.split('.')) - # curmod will be transformed by the - # loop into the value to pickle - curmod = sys.modules[next(varpath)] - for modname in varpath: - curmod = getattr(curmod, modname) - # replace obj with value retrieved - return self._flatten(curmod) - except KeyError: - # well, we can't do anything with that, so we ignore it - pass - - elif reduce_val: - # at this point, reduce_val should be some kind of iterable - # pad out to len 5 - rv_as_list = list(reduce_val) - insufficiency = 5 - len(rv_as_list) - if insufficiency: - rv_as_list += [None] * insufficiency - - if getattr(rv_as_list[0], '__name__', '') == '__newobj__': - rv_as_list[0] = tags.NEWOBJ - - f, args, state, listitems, dictitems = rv_as_list - - # check that getstate/setstate is sane - if not (state and hasattr(obj, '__getstate__') - and not hasattr(obj, '__setstate__') - and not isinstance(obj, dict)): - # turn iterators to iterables for convenient serialization - if rv_as_list[3]: - rv_as_list[3] = tuple(rv_as_list[3]) - - if rv_as_list[4]: - rv_as_list[4] = tuple(rv_as_list[4]) - - reduce_args = list(map(self._flatten, rv_as_list)) - last_index = len(reduce_args) - 1 - while last_index >= 2 and reduce_args[last_index] is None: - last_index -= 1 - data[tags.REDUCE] = reduce_args[:last_index+1] - - return data - - if has_class and not util.is_module(obj): - if self.unpicklable: - data[tags.OBJECT] = class_name - - if has_getnewargs_ex: - data[tags.NEWARGSEX] = list( - map(self._flatten, obj.__getnewargs_ex__())) - - if has_getnewargs and not has_getnewargs_ex: - data[tags.NEWARGS] = self._flatten(obj.__getnewargs__()) - - if has_getinitargs: - data[tags.INITARGS] = self._flatten(obj.__getinitargs__()) - - if has_getstate: - try: - state = obj.__getstate__() - except TypeError: - # Has getstate but it cannot be called, e.g. file descriptors - # in Python3 - self._pickle_warning(obj) - return None - else: - return self._getstate(state, data) - - if util.is_module(obj): - if self.unpicklable: - data[tags.REPR] = '{name}/{name}'.format(name=obj.__name__) - else: - data = compat.ustr(obj) - return data - - if util.is_dictionary_subclass(obj): - self._flatten_dict_obj(obj, data) - return data - - if util.is_sequence_subclass(obj): - return self._flatten_sequence_obj(obj, data) - - if util.is_iterator(obj): - # force list in python 3 - data[tags.ITERATOR] = list( - map(self._flatten, islice(obj, self._max_iter))) - return data - - if has_dict: - # Support objects that subclasses list and set - if util.is_sequence_subclass(obj): - return self._flatten_sequence_obj(obj, data) - - # hack for zope persistent objects; this unghostifies the object - getattr(obj, '_', None) - return self._flatten_dict_obj(obj.__dict__, data) - - if has_slots: - return self._flatten_newstyle_with_slots(obj, data) - - # catchall return for data created above without a return - # (e.g. __getnewargs__ is not supposed to be the end of the story) - if data: - return data - - self._pickle_warning(obj) - return None - - def _flatten_function(self, obj): - if self.unpicklable: - data = {tags.FUNCTION: util.importable_name(obj)} - else: - data = None - - return data - - def _flatten_dict_obj(self, obj, data=None): - """Recursively call flatten() and return json-friendly dict - """ - if data is None: - data = obj.__class__() - - flatten = self._flatten_key_value_pair - for k, v in sorted(obj.items(), key=util.itemgetter): - flatten(k, v, data) - - # the collections.defaultdict protocol - if hasattr(obj, 'default_factory') and callable(obj.default_factory): - factory = obj.default_factory - if util.is_type(factory): - # Reference the class/type - value = _mktyperef(factory) - else: - # The factory is not a type and could reference e.g. functions - # or even the object instance itself, which creates a cycle. - if self._mkref(factory): - # We've never seen this object before so pickle it in-place. - # Create an instance from the factory and assume that the - # resulting instance is a suitable examplar. - value = self._flatten(handlers.CloneFactory(factory())) - else: - # We've seen this object before. - # Break the cycle by emitting a reference. - value = self._getref(factory) - data['default_factory'] = value - - # Sub-classes of dict - if hasattr(obj, '__dict__') and self.unpicklable: - dict_data = {} - self._flatten_dict_obj(obj.__dict__, dict_data) - data['__dict__'] = dict_data - - return data - - def _flatten_obj_attrs(self, obj, attrs, data): - flatten = self._flatten_key_value_pair - ok = False - for k in attrs: - try: - value = getattr(obj, k) - flatten(k, value, data) - except AttributeError: - # The attribute may have been deleted - continue - ok = True - return ok - - def _flatten_newstyle_with_slots(self, obj, data): - """Return a json-friendly dict for new-style objects with __slots__. - """ - allslots = [_wrap_string_slot(getattr(cls, '__slots__', tuple())) - for cls in obj.__class__.mro()] - - if not self._flatten_obj_attrs(obj, chain(*allslots), data): - attrs = [x for x in dir(obj) - if not x.startswith('__') and not x.endswith('__')] - self._flatten_obj_attrs(obj, attrs, data) - - return data - - def _flatten_key_value_pair(self, k, v, data): - """Flatten a key/value pair into the passed-in dictionary.""" - if not util.is_picklable(k, v): - return data - if self.keys: - if not isinstance(k, string_types) or k.startswith(tags.JSON_KEY): - k = self._escape_key(k) - else: - if k is None: - k = 'null' # for compatibility with common json encoders - - if self.numeric_keys and isinstance(k, numeric_types): - pass - elif not isinstance(k, string_types): - try: - k = repr(k) - except Exception: - k = compat.ustr(k) - - data[k] = self._flatten(v) - return data - - def _flatten_sequence_obj(self, obj, data): - """Return a json-friendly dict for a sequence subclass.""" - if hasattr(obj, '__dict__'): - self._flatten_dict_obj(obj.__dict__, data) - value = [self._flatten(v) for v in obj] - if self.unpicklable: - data[tags.SEQ] = value - else: - return value - return data - - def _escape_key(self, k): - return tags.JSON_KEY + encode(k, - reset=False, keys=True, - context=self, backend=self.backend, - make_refs=self.make_refs) - - def _getstate(self, obj, data): - state = self._flatten(obj) - if self.unpicklable: - data[tags.STATE] = state - else: - data = state - return data - - def _pickle_warning(self, obj): - if self.warn: - msg = 'jsonpickle cannot pickle %r: replaced with None' % obj - warnings.warn(msg) - - -def _in_cycle(obj, objs, max_reached, make_refs): - return ( - max_reached or ( - not make_refs and id(obj) in objs - ) - ) and not util.is_primitive(obj) - - -def _mktyperef(obj): - """Return a typeref dictionary - - >>> _mktyperef(AssertionError) == {'py/type': 'builtins.AssertionError'} - True - - """ - return {tags.TYPE: util.importable_name(obj)} - - -def _wrap_string_slot(string): - """Converts __slots__ = 'a' into __slots__ = ('a',) - """ - if isinstance(string, string_types): - return (string,) - return string diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/tags.py b/node_modules/arepl-backend/python/arepl_jsonpickle/tags.py deleted file mode 100644 index 6c02638..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/tags.py +++ /dev/null @@ -1,52 +0,0 @@ -"""The jsonpickle.tags module provides the custom tags -used for pickling and unpickling Python objects. - -These tags are keys into the flattened dictionaries -created by the Pickler class. The Unpickler uses -these custom key names to identify dictionaries -that need to be specially handled. -""" -from __future__ import absolute_import, division, unicode_literals - - -BYTES = 'py/bytes' -B64 = 'py/b64' -B85 = 'py/b85' -FUNCTION = 'py/function' -ID = 'py/id' -INITARGS = 'py/initargs' -ITERATOR = 'py/iterator' -JSON_KEY = 'json://' -NEWARGS = 'py/newargs' -NEWARGSEX = 'py/newargsex' -NEWOBJ = 'py/newobj' -OBJECT = 'py/object' -REDUCE = 'py/reduce' -REF = 'py/ref' -REPR = 'py/repr' -SEQ = 'py/seq' -SET = 'py/set' -STATE = 'py/state' -TUPLE = 'py/tuple' -TYPE = 'py/type' - -# All reserved tag names -RESERVED = { - BYTES, - FUNCTION, - ID, - INITARGS, - ITERATOR, - NEWARGS, - NEWARGSEX, - NEWOBJ, - OBJECT, - REDUCE, - REF, - REPR, - SEQ, - SET, - STATE, - TUPLE, - TYPE, -} diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/unpickler.py b/node_modules/arepl-backend/python/arepl_jsonpickle/unpickler.py deleted file mode 100644 index 9405af3..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/unpickler.py +++ /dev/null @@ -1,710 +0,0 @@ -# Copyright (C) 2008 John Paulett (john -at- paulett.org) -# Copyright (C) 2009-2018 David Aguilar (davvid -at- gmail.com) -# All rights reserved. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. -from __future__ import absolute_import, division, unicode_literals -import quopri -import sys - -from . import compat -from . import util -from . import tags -from . import handlers -from .compat import numeric_types -from .backend import json - - -def decode(string, backend=None, context=None, keys=False, reset=True, - safe=False, classes=None): - """Convert a JSON string into a Python object. - - The keyword argument 'keys' defaults to False. - If set to True then jsonpickle will decode non-string dictionary keys - into python objects via the jsonpickle protocol. - - The keyword argument 'classes' defaults to None. - If set to a single class, or a sequence (list, set, tuple) of classes, - then the classes will be made available when constructing objects. This - can be used to give jsonpickle access to local classes that are not - available through the global module import scope. - - >>> decode('"my string"') == 'my string' - True - >>> decode('36') - 36 - """ - backend = backend or json - context = context or Unpickler(keys=keys, backend=backend, safe=safe) - data = backend.decode(string) - return context.restore(data, reset=reset, classes=classes) - - -def _safe_hasattr(obj, attr): - """Workaround unreliable hasattr() availability on sqlalchemy objects""" - try: - object.__getattribute__(obj, attr) - return True - except AttributeError: - return False - - -class _Proxy(object): - """Proxies are dummy objects that are later replaced by real instances - - The `restore()` function has to solve a tricky problem when pickling - objects with cyclical references -- the parent instance does not yet - exist. - - The problem is that `__getnewargs__()`, `__getstate__()`, custom handlers, - and cyclical objects graphs are allowed to reference the yet-to-be-created - object via the referencing machinery. - - In other words, objects are allowed to depend on themselves for - construction! - - We solve this problem by placing dummy Proxy objects into the referencing - machinery so that we can construct the child objects before constructing - the parent. Objects are initially created with Proxy attribute values - instead of real references. - - We collect all objects that contain references to proxies and run - a final sweep over them to swap in the real instance. This is done - at the very end of the top-level `restore()`. - - The `instance` attribute below is replaced with the real instance - after `__new__()` has been used to construct the object and is used - when swapping proxies with real instances. - - """ - def __init__(self): - self.instance = None - - def get(self): - return self.instance - - def reset(self, instance): - self.instance = instance - - -class _IDProxy(_Proxy): - def __init__(self, objs, index): - self._index = index - self._objs = objs - - def get(self): - return self._objs[self._index] - - -def _obj_setattr(obj, attr, proxy): - setattr(obj, attr, proxy.get()) - - -def _obj_setvalue(obj, idx, proxy): - obj[idx] = proxy.get() - - -class Unpickler(object): - - def __init__(self, backend=None, keys=False, safe=False): - self.backend = backend or json - self.keys = keys - self.safe = safe - - self.reset() - - def reset(self): - """Resets the object's internal state. - """ - # Map reference names to object instances - self._namedict = {} - - # The stack of names traversed for child objects - self._namestack = [] - - # Map of objects to their index in the _objs list - self._obj_to_idx = {} - self._objs = [] - self._proxies = [] - - # Extra local classes not accessible globally - self._classes = {} - - def restore(self, obj, reset=True, classes=None): - """Restores a flattened object to its original python state. - - Simply returns any of the basic builtin types - - >>> u = Unpickler() - >>> u.restore('hello world') == 'hello world' - True - >>> u.restore({'key': 'value'}) == {'key': 'value'} - True - - """ - if reset: - self.reset() - if classes: - self.register_classes(classes) - value = self._restore(obj) - if reset: - self._swap_proxies() - return value - - def register_classes(self, classes): - """Register one or more classes - - :param classes: sequence of classes or a single class to register - - """ - if isinstance(classes, (list, tuple, set)): - for cls in classes: - self.register_classes(cls) - else: - self._classes[util.importable_name(classes)] = classes - - def _swap_proxies(self): - """Replace proxies with their corresponding instances""" - for (obj, attr, proxy, method) in self._proxies: - method(obj, attr, proxy) - self._proxies = [] - - def _restore(self, obj): - if has_tag(obj, tags.B64): - restore = self._restore_base64 - elif has_tag(obj, tags.B85): - restore = self._restore_base85 - elif has_tag(obj, tags.BYTES): # Backwards compatibility - restore = self._restore_quopri - elif has_tag(obj, tags.ID): - restore = self._restore_id - elif has_tag(obj, tags.REF): # Backwards compatibility - restore = self._restore_ref - elif has_tag(obj, tags.ITERATOR): - restore = self._restore_iterator - elif has_tag(obj, tags.TYPE): - restore = self._restore_type - elif has_tag(obj, tags.REPR): # Backwards compatibility - restore = self._restore_repr - elif has_tag(obj, tags.REDUCE): - restore = self._restore_reduce - elif has_tag(obj, tags.OBJECT): - restore = self._restore_object - elif has_tag(obj, tags.FUNCTION): - restore = self._restore_function - elif util.is_list(obj): - restore = self._restore_list - elif has_tag(obj, tags.TUPLE): - restore = self._restore_tuple - elif has_tag(obj, tags.SET): - restore = self._restore_set - elif util.is_dictionary(obj): - restore = self._restore_dict - else: - def restore(x): - return x - return restore(obj) - - def _restore_base64(self, obj): - return util.b64decode(obj[tags.B64].encode('utf-8')) - - def _restore_base85(self, obj): - return util.b85decode(obj[tags.B85].encode('utf-8')) - - #: For backwards compatibility with bytes data produced by older versions - def _restore_quopri(self, obj): - return quopri.decodestring(obj[tags.BYTES].encode('utf-8')) - - def _restore_iterator(self, obj): - return iter(self._restore_list(obj[tags.ITERATOR])) - - def _restore_reduce(self, obj): - """ - Supports restoring with all elements of __reduce__ as per pep 307. - Assumes that iterator items (the last two) are represented as lists - as per pickler implementation. - """ - proxy = _Proxy() - self._mkref(proxy) - reduce_val = list(map(self._restore, obj[tags.REDUCE])) - if len(reduce_val) < 5: - reduce_val.extend([None] * (5 - len(reduce_val))) - f, args, state, listitems, dictitems = reduce_val - - if f == tags.NEWOBJ or getattr(f, '__name__', '') == '__newobj__': - # mandated special case - cls = args[0] - if not isinstance(cls, type): - cls = self._restore(cls) - stage1 = cls.__new__(cls, *args[1:]) - else: - stage1 = f(*args) - - if state: - try: - stage1.__setstate__(state) - except AttributeError: - # it's fine - we'll try the prescribed default methods - try: - # we can't do a straight update here because we - # need object identity of the state dict to be - # preserved so that _swap_proxies works out - for k, v in stage1.__dict__.items(): - state.setdefault(k, v) - stage1.__dict__ = state - except AttributeError: - # next prescribed default - try: - for k, v in state.items(): - setattr(stage1, k, v) - except Exception: - dict_state, slots_state = state - if dict_state: - stage1.__dict__.update(dict_state) - if slots_state: - for k, v in slots_state.items(): - setattr(stage1, k, v) - - if listitems: - # should be lists if not None - try: - stage1.extend(listitems) - except AttributeError: - for x in listitems: - stage1.append(x) - - if dictitems: - for k, v in dictitems: - stage1.__setitem__(k, v) - - proxy.reset(stage1) - self._swapref(proxy, stage1) - return stage1 - - def _restore_id(self, obj): - try: - idx = obj[tags.ID] - return self._objs[idx] - except IndexError: - return _IDProxy(self._objs, idx) - - def _restore_ref(self, obj): - return self._namedict.get(obj[tags.REF]) - - def _restore_type(self, obj): - typeref = loadclass(obj[tags.TYPE], classes=self._classes) - if typeref is None: - return obj - return typeref - - def _restore_repr(self, obj): - if self.safe: - # eval() is not allowed in safe mode - return None - obj = loadrepr(obj[tags.REPR]) - return self._mkref(obj) - - def _restore_object(self, obj): - class_name = obj[tags.OBJECT] - cls = loadclass(class_name, classes=self._classes) - handler = handlers.get(cls, handlers.get(class_name)) - if handler is not None: # custom handler - proxy = _Proxy() - self._mkref(proxy) - instance = handler(self).restore(obj) - proxy.reset(instance) - self._swapref(proxy, instance) - return instance - - if cls is None: - return self._mkref(obj) - - return self._restore_object_instance(obj, cls) - - def _restore_function(self, obj): - return loadclass(obj[tags.FUNCTION], classes=self._classes) - - def _loadfactory(self, obj): - try: - default_factory = obj['default_factory'] - except KeyError: - return None - del obj['default_factory'] - return self._restore(default_factory) - - def _restore_object_instance(self, obj, cls): - # This is a placeholder proxy object which allows child objects to - # reference the parent object before it has been instantiated. - proxy = _Proxy() - self._mkref(proxy) - - # An object can install itself as its own factory, so load the factory - # after the instance is available for referencing. - factory = self._loadfactory(obj) - - if has_tag(obj, tags.NEWARGSEX): - args, kwargs = obj[tags.NEWARGSEX] - else: - args = getargs(obj, classes=self._classes) - kwargs = {} - if args: - args = self._restore(args) - if kwargs: - kwargs = self._restore(kwargs) - - is_oldstyle = ( - not (isinstance(cls, type) or getattr(cls, '__meta__', None))) - try: - if (not is_oldstyle) and hasattr(cls, '__new__'): - # new style classes - if factory: - instance = cls.__new__(cls, factory, *args, **kwargs) - instance.default_factory = factory - else: - instance = cls.__new__(cls, *args, **kwargs) - else: - instance = object.__new__(cls) - except TypeError: # old-style classes - is_oldstyle = True - - if is_oldstyle: - try: - instance = cls(*args) - except TypeError: # fail gracefully - try: - instance = make_blank_classic(cls) - except Exception: # fail gracefully - return self._mkref(obj) - - proxy.reset(instance) - self._swapref(proxy, instance) - - if isinstance(instance, tuple): - return instance - - if (_safe_hasattr(instance, 'default_factory') and - isinstance(instance.default_factory, _Proxy)): - instance.default_factory = instance.default_factory.get() - - return self._restore_object_instance_variables(obj, instance) - - def _restore_from_dict(self, obj, instance, ignorereserved=True): - restore_key = self._restore_key_fn() - method = _obj_setattr - deferred = {} - - for k, v in sorted(obj.items(), key=util.itemgetter): - # ignore the reserved attribute - if ignorereserved and k in tags.RESERVED: - continue - if isinstance(k, numeric_types): - str_k = k.__str__() - else: - str_k = k - self._namestack.append(str_k) - k = restore_key(k) - # step into the namespace - value = self._restore(v) - if (util.is_noncomplex(instance) or - util.is_dictionary_subclass(instance)): - try: - if k == '__dict__': - setattr(instance, k, value) - else: - instance[k] = value - except TypeError: - # Immutable object, must be constructed in one shot - if k != '__dict__': - deferred[k] = value - self._namestack.pop() - continue - else: - setattr(instance, k, value) - - # This instance has an instance variable named `k` that is - # currently a proxy and must be replaced - if isinstance(value, _Proxy): - self._proxies.append((instance, k, value, method)) - - # step out - self._namestack.pop() - - if deferred: - # SQLAlchemy Immutable mappings must be constructed in one shot - instance = instance.__class__(deferred) - - return instance - - def _restore_object_instance_variables(self, obj, instance): - instance = self._restore_from_dict(obj, instance) - - # Handle list and set subclasses - if has_tag(obj, tags.SEQ): - if hasattr(instance, 'append'): - for v in obj[tags.SEQ]: - instance.append(self._restore(v)) - if hasattr(instance, 'add'): - for v in obj[tags.SEQ]: - instance.add(self._restore(v)) - - if has_tag(obj, tags.STATE): - instance = self._restore_state(obj, instance) - - return instance - - def _restore_state(self, obj, instance): - state = self._restore(obj[tags.STATE]) - has_slots = (isinstance(state, tuple) and len(state) == 2 - and isinstance(state[1], dict)) - has_slots_and_dict = has_slots and isinstance(state[0], dict) - if hasattr(instance, '__setstate__'): - instance.__setstate__(state) - elif isinstance(state, dict): - # implements described default handling - # of state for object with instance dict - # and no slots - instance = self._restore_from_dict( - state, instance, ignorereserved=False) - elif has_slots: - instance = self._restore_from_dict( - state[1], instance, ignorereserved=False) - if has_slots_and_dict: - instance = self._restore_from_dict( - state[0], instance, ignorereserved=False) - elif (not hasattr(instance, '__getnewargs__') - and not hasattr(instance, '__getnewargs_ex__')): - # __setstate__ is not implemented so that means that the best - # we can do is return the result of __getstate__() rather than - # return an empty shell of an object. - # However, if there were newargs, it's not an empty shell - instance = state - return instance - - def _restore_list(self, obj): - parent = [] - self._mkref(parent) - children = [self._restore(v) for v in obj] - parent.extend(children) - method = _obj_setvalue - proxies = [ - (parent, idx, value, method) - for idx, value in enumerate(parent) - if isinstance(value, _Proxy) - ] - self._proxies.extend(proxies) - return parent - - def _restore_tuple(self, obj): - return tuple([self._restore(v) for v in obj[tags.TUPLE]]) - - def _restore_set(self, obj): - return {self._restore(v) for v in obj[tags.SET]} - - def _restore_dict(self, obj): - data = {} - restore_key = self._restore_key_fn() - for k, v in sorted(obj.items(), key=util.itemgetter): - if isinstance(k, numeric_types): - str_k = k.__str__() - else: - str_k = k - self._namestack.append(str_k) - k = restore_key(k) - data[k] = self._restore(v) - # k is currently a proxy and must be replaced - if isinstance(data[k], _Proxy): - self._proxies.append((data, k, data[k], _obj_setvalue)) - - self._namestack.pop() - return data - - def _restore_key_fn(self): - """Return a callable that restores keys - - This function is responsible for restoring non-string keys - when we are decoding with `keys=True`. - - """ - # This function is called before entering a tight loop - # where the returned function will be called. - # We return a specific function after checking self.keys - # instead of doing so in the body of the function to - # avoid conditional branching inside a tight loop. - if self.keys: - restore_key = self._restore_pickled_key - else: - def restore_key(key): - return key - return restore_key - - def _restore_pickled_key(self, key): - """Restore a possibly pickled key""" - if (isinstance(key, compat.string_types) and - key.startswith(tags.JSON_KEY)): - key = decode(key[len(tags.JSON_KEY):], - backend=self.backend, context=self, - keys=True, reset=False) - return key - - def _refname(self): - """Calculates the name of the current location in the JSON stack. - - This is called as jsonpickle traverses the object structure to - create references to previously-traversed objects. This allows - cyclical data structures such as doubly-linked lists. - jsonpickle ensures that duplicate python references to the same - object results in only a single JSON object definition and - special reference tags to represent each reference. - - >>> u = Unpickler() - >>> u._namestack = [] - >>> u._refname() == '/' - True - >>> u._namestack = ['a'] - >>> u._refname() == '/a' - True - >>> u._namestack = ['a', 'b'] - >>> u._refname() == '/a/b' - True - - """ - return '/' + '/'.join(self._namestack) - - def _mkref(self, obj): - obj_id = id(obj) - try: - self._obj_to_idx[obj_id] - except KeyError: - self._obj_to_idx[obj_id] = len(self._objs) - self._objs.append(obj) - # Backwards compatibility: old versions of jsonpickle - # produced "py/ref" references. - self._namedict[self._refname()] = obj - return obj - - def _swapref(self, proxy, instance): - proxy_id = id(proxy) - instance_id = id(instance) - - instance_index = self._obj_to_idx[proxy_id] - self._obj_to_idx[instance_id] = instance_index - del self._obj_to_idx[proxy_id] - - self._objs[instance_index] = instance - self._namedict[self._refname()] = instance - - -def loadclass(module_and_name, classes=None): - """Loads the module and returns the class. - - >>> cls = loadclass('datetime.datetime') - >>> cls.__name__ - 'datetime' - - >>> loadclass('does.not.exist') - - >>> loadclass('builtins.int')() - 0 - - """ - # Check if the class exists in a caller-provided scope - if classes: - try: - return classes[module_and_name] - except KeyError: - pass - # Otherwise, load classes from globally-accessible imports - names = module_and_name.split('.') - # First assume that everything up to the last dot is the module name, - # then try other splits to handle classes that are defined within - # classes - for up_to in range(len(names)-1, 0, -1): - module = util.untranslate_module_name('.'.join(names[:up_to])) - try: - __import__(module) - obj = sys.modules[module] - for class_name in names[up_to:]: - obj = getattr(obj, class_name) - return obj - except (AttributeError, ImportError, ValueError): - continue - return None - - -def getargs(obj, classes=None): - """Return arguments suitable for __new__()""" - # Let saved newargs take precedence over everything - if has_tag(obj, tags.NEWARGSEX): - raise ValueError("__newargs_ex__ returns both args and kwargs") - - if has_tag(obj, tags.NEWARGS): - return obj[tags.NEWARGS] - - if has_tag(obj, tags.INITARGS): - return obj[tags.INITARGS] - - try: - seq_list = obj[tags.SEQ] - obj_dict = obj[tags.OBJECT] - except KeyError: - return [] - typeref = loadclass(obj_dict, classes=classes) - if not typeref: - return [] - if hasattr(typeref, '_fields'): - if len(typeref._fields) == len(seq_list): - return seq_list - return [] - - -class _trivialclassic: - """ - A trivial class that can be instantiated with no args - """ - - -def make_blank_classic(cls): - """ - Implement the mandated strategy for dealing with classic classes - which cannot be instantiated without __getinitargs__ because they - take parameters - """ - instance = _trivialclassic() - instance.__class__ = cls - return instance - - -def loadrepr(reprstr): - """Returns an instance of the object from the object's repr() string. - It involves the dynamic specification of code. - - >>> obj = loadrepr('datetime/datetime.datetime.now()') - >>> obj.__class__.__name__ - 'datetime' - - """ - module, evalstr = reprstr.split('/') - mylocals = locals() - localname = module - if '.' in localname: - localname = module.split('.', 1)[0] - mylocals[localname] = __import__(module) - return eval(evalstr) - - -def has_tag(obj, tag): - """Helper class that tests to see if the obj is a dictionary - and contains a particular key/tag. - - >>> obj = {'test': 1} - >>> has_tag(obj, 'test') - True - >>> has_tag(obj, 'fail') - False - - >>> has_tag(42, 'fail') - False - - """ - return type(obj) is dict and tag in obj diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/util.py b/node_modules/arepl-backend/python/arepl_jsonpickle/util.py deleted file mode 100644 index 4b023ed..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/util.py +++ /dev/null @@ -1,536 +0,0 @@ -# Copyright (C) 2008 John Paulett (john -at- paulett.org) -# Copyright (C) 2009-2018 David Aguilar (davvid -at- gmail.com) -# All rights reserved. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. - -"""Helper functions for pickling and unpickling. Most functions assist in -determining the type of an object. -""" -from __future__ import absolute_import, division, unicode_literals -import base64 -import collections -import io -import operator -import time -import types -import inspect - -from . import tags -from . import compat -from .compat import numeric_types, PY2, PY3, class_types -from .compat import abc_iterator, iterator_types - -if PY2: - import __builtin__ - -SEQUENCES = (list, set, tuple) -PRIMITIVES = (compat.ustr, bool, type(None)) + numeric_types - - -def is_type(obj): - """Returns True is obj is a reference to a type. - - >>> is_type(1) - False - - >>> is_type(object) - True - - >>> class Klass: pass - >>> is_type(Klass) - True - """ - # use "isinstance" and not "is" to allow for metaclasses - return isinstance(obj, class_types) - - -def has_method(obj, name): - # false if attribute doesn't exist - if not hasattr(obj, name): - return False - func = getattr(obj, name) - - # builtin descriptors like __getnewargs__ - if isinstance(func, types.BuiltinMethodType): - return True - - # note that FunctionType has a different meaning in py2/py3 - if not isinstance(func, (types.MethodType, types.FunctionType)): - return False - - # need to go through __dict__'s since in py3 - # methods are essentially descriptors - - # __class__ for old-style classes - base_type = obj if is_type(obj) else obj.__class__ - original = None - # there is no .mro() for old-style classes - for subtype in inspect.getmro(base_type): - original = vars(subtype).get(name) - if original is not None: - break - - # name not found in the mro - if original is None: - return False - - # static methods are always fine - if isinstance(original, staticmethod): - return True - - # at this point, the method has to be an instancemthod or a classmethod - self_attr = '__self__' if PY3 else 'im_self' - if not hasattr(func, self_attr): - return False - bound_to = getattr(func, self_attr) - - # class methods - if isinstance(original, classmethod): - return issubclass(base_type, bound_to) - - # bound methods - return isinstance(obj, type(bound_to)) - - -def is_object(obj): - """Returns True is obj is a reference to an object instance. - - >>> is_object(1) - True - - >>> is_object(object()) - True - - >>> is_object(lambda x: 1) - False - """ - return (isinstance(obj, object) and - not isinstance(obj, (type, types.FunctionType, - types.BuiltinFunctionType))) - - -def is_primitive(obj): - """Helper method to see if the object is a basic data type. Unicode strings, - integers, longs, floats, booleans, and None are considered primitive - and will return True when passed into *is_primitive()* - - >>> is_primitive(3) - True - >>> is_primitive([4,4]) - False - """ - return type(obj) in PRIMITIVES - - -def is_dictionary(obj): - """Helper method for testing if the object is a dictionary. - - >>> is_dictionary({'key':'value'}) - True - - """ - return type(obj) is dict - - -def is_sequence(obj): - """Helper method to see if the object is a sequence (list, set, or tuple). - - >>> is_sequence([4]) - True - - """ - return type(obj) in SEQUENCES - - -def is_list(obj): - """Helper method to see if the object is a Python list. - - >>> is_list([4]) - True - """ - return type(obj) is list - - -def is_set(obj): - """Helper method to see if the object is a Python set. - - >>> is_set(set()) - True - """ - return type(obj) is set - - -def is_bytes(obj): - """Helper method to see if the object is a bytestring. - - >>> is_bytes(b'foo') - True - """ - return type(obj) is bytes - - -def is_unicode(obj): - """Helper method to see if the object is a unicode string""" - return type(obj) is compat.ustr - - -def is_tuple(obj): - """Helper method to see if the object is a Python tuple. - - >>> is_tuple((1,)) - True - """ - return type(obj) is tuple - - -def is_dictionary_subclass(obj): - """Returns True if *obj* is a subclass of the dict type. *obj* must be - a subclass and not the actual builtin dict. - - >>> class Temp(dict): pass - >>> is_dictionary_subclass(Temp()) - True - """ - # TODO: add UserDict - return (hasattr(obj, '__class__') - and issubclass(obj.__class__, dict) - and type(obj) is not dict) - - -def is_sequence_subclass(obj): - """Returns True if *obj* is a subclass of list, set or tuple. - - *obj* must be a subclass and not the actual builtin, such - as list, set, tuple, etc.. - - >>> class Temp(list): pass - >>> is_sequence_subclass(Temp()) - True - """ - return (hasattr(obj, '__class__') - and ( - issubclass(obj.__class__, SEQUENCES) - or is_list_like(obj) - ) - and not is_sequence(obj)) - - -def is_noncomplex(obj): - """Returns True if *obj* is a special (weird) class, that is more complex - than primitive data types, but is not a full object. Including: - - * :class:`~time.struct_time` - """ - if type(obj) is time.struct_time: - return True - return False - - -def is_function(obj): - """Returns true if passed a function - - >>> is_function(lambda x: 1) - True - - >>> is_function(locals) - True - - >>> def method(): pass - >>> is_function(method) - True - - >>> is_function(1) - False - """ - function_types = ( - types.FunctionType, - types.MethodType, - types.LambdaType, - types.BuiltinFunctionType, - types.BuiltinMethodType, - ) - return type(obj) in function_types - - -def is_module_function(obj): - """Return True if `obj` is a module-global function - - >>> import os - >>> is_module_function(os.path.exists) - True - - >>> is_module_function(lambda: None) - False - - """ - - return (hasattr(obj, '__class__') and - isinstance(obj, (types.FunctionType, types.BuiltinFunctionType)) and - hasattr(obj, '__module__') and - hasattr(obj, '__name__') and - obj.__name__ != '') - - -def is_module(obj): - """Returns True if passed a module - - >>> import os - >>> is_module(os) - True - - """ - return isinstance(obj, types.ModuleType) - - -def is_picklable(name, value): - """Return True if an object can be pickled - - >>> import os - >>> is_picklable('os', os) - True - - >>> def foo(): pass - >>> is_picklable('foo', foo) - True - - >>> is_picklable('foo', lambda: None) - False - - """ - if name in tags.RESERVED: - return False - return is_module_function(value) or not is_function(value) - - -def is_installed(module): - """Tests to see if ``module`` is available on the sys.path - - >>> is_installed('sys') - True - >>> is_installed('hopefullythisisnotarealmodule') - False - - """ - try: - __import__(module) - return True - except ImportError: - return False - - -def is_list_like(obj): - return hasattr(obj, '__getitem__') and hasattr(obj, 'append') - - -def is_iterator(obj): - is_file = PY2 and isinstance(obj, __builtin__.file) - return (isinstance(obj, abc_iterator) and - not isinstance(obj, io.IOBase) and not is_file) - - -def is_collections(obj): - try: - return type(obj).__module__ == 'collections' - except Exception: - return False - - -def is_reducible(obj): - """ - Returns false if of a type which have special casing, - and should not have their __reduce__ methods used - """ - # defaultdicts may contain functions which we cannot serialise - if is_collections(obj) and not isinstance(obj, collections.defaultdict): - return True - return (not - (is_list(obj) or - is_list_like(obj) or - is_primitive(obj) or - is_bytes(obj) or - is_unicode(obj) or - is_dictionary(obj) or - is_sequence(obj) or - is_set(obj) or - is_tuple(obj) or - is_dictionary_subclass(obj) or - is_sequence_subclass(obj) or - is_function(obj) or - is_module(obj) or - isinstance(getattr(obj, '__slots__', None), iterator_types) or - type(obj) is object or - obj is object or - (is_type(obj) and obj.__module__ == 'datetime') - )) - - -def in_dict(obj, key, default=False): - """ - Returns true if key exists in obj.__dict__; false if not in. - If obj.__dict__ is absent, return default - """ - return (key in obj.__dict__) if getattr(obj, '__dict__', None) else default - - -def in_slots(obj, key, default=False): - """ - Returns true if key exists in obj.__slots__; false if not in. - If obj.__slots__ is absent, return default - """ - return ( - (key in obj.__slots__) if getattr(obj, '__slots__', None) else default - ) - - -def has_reduce(obj): - """ - Tests if __reduce__ or __reduce_ex__ exists in the object dict or - in the class dicts of every class in the MRO *except object*. - - Returns a tuple of booleans (has_reduce, has_reduce_ex) - """ - - if not is_reducible(obj) or is_type(obj): - return (False, False) - - # in this case, reduce works and is desired - # notwithstanding depending on default object - # reduce - if is_noncomplex(obj): - return (False, True) - - has_reduce = False - has_reduce_ex = False - - REDUCE = '__reduce__' - REDUCE_EX = '__reduce_ex__' - - # For object instance - has_reduce = in_dict(obj, REDUCE) or in_slots(obj, REDUCE) - has_reduce_ex = in_dict(obj, REDUCE_EX) or in_slots(obj, REDUCE_EX) - - # turn to the MRO - for base in type(obj).__mro__: - if is_reducible(base): - has_reduce = has_reduce or in_dict(base, REDUCE) - has_reduce_ex = has_reduce_ex or in_dict(base, REDUCE_EX) - if has_reduce and has_reduce_ex: - return (has_reduce, has_reduce_ex) - - # for things that don't have a proper dict but can be - # getattred (rare, but includes some builtins) - cls = type(obj) - object_reduce = getattr(object, REDUCE) - object_reduce_ex = getattr(object, REDUCE_EX) - if not has_reduce: - has_reduce_cls = getattr(cls, REDUCE, False) - if has_reduce_cls is not object_reduce: - has_reduce = has_reduce_cls - - if not has_reduce_ex: - has_reduce_ex_cls = getattr(cls, REDUCE_EX, False) - if has_reduce_ex_cls is not object_reduce_ex: - has_reduce_ex = has_reduce_ex_cls - - return (has_reduce, has_reduce_ex) - - -def translate_module_name(module): - """Rename builtin modules to a consistent module name. - - Prefer the more modern naming. - - This is used so that references to Python's `builtins` module can - be loaded in both Python 2 and 3. We remap to the "__builtin__" - name and unmap it when importing. - - Map the Python2 `exceptions` module to `builtins` because - `builtins` is a superset and contains everything that is - available in `exceptions`, which makes the translation simpler. - - See untranslate_module_name() for the reverse operation. - """ - lookup = dict(__builtin__='builtins', exceptions='builtins') - return lookup.get(module, module) - - -def untranslate_module_name(module): - """Rename module names mention in JSON to names that we can import - - This reverses the translation applied by translate_module_name() to - a module name available to the current version of Python. - - """ - module = _0_9_6_compat_untranslate(module) - lookup = dict(builtins='__builtin__') if PY2 else {} - return lookup.get(module, module) - - -def _0_9_6_compat_untranslate(module): - """Provide compatibility for pickles created with jsonpickle 0.9.6 and - earlier, remapping `exceptions` and `__builtin__` to `builtins`. - """ - lookup = dict(__builtin__='builtins', exceptions='builtins') - return lookup.get(module, module) - - -def importable_name(cls): - """ - >>> class Example(object): - ... pass - - >>> ex = Example() - >>> importable_name(ex.__class__) == 'jsonpickle.util.Example' - True - >>> importable_name(type(25)) == 'builtins.int' - True - >>> importable_name(None.__class__) == 'builtins.NoneType' - True - >>> importable_name(False.__class__) == 'builtins.bool' - True - >>> importable_name(AttributeError) == 'builtins.AttributeError' - True - - """ - # Use the fully-qualified name if available (Python >= 3.3) - name = getattr(cls, '__qualname__', cls.__name__) - module = translate_module_name(cls.__module__) - return '{}.{}'.format(module, name) - - -def b64encode(data): - """ - Encode binary data to ascii text in base64. Data must be bytes. - """ - return base64.b64encode(data).decode('ascii') - - -def b64decode(payload): - """ - Decode payload - must be ascii text. - """ - return base64.b64decode(payload) - - -def b85encode(data): - """ - Encode binary data to ascii text in base85. Data must be bytes. - """ - if PY2: - raise NotImplementedError("Python 2 can't encode data in base85.") - return base64.b85encode(data).decode('ascii') - - -def b85decode(payload): - """ - Decode payload - must be ascii text. - """ - if PY2: - raise NotImplementedError("Python 2 can't decode base85-encoded data.") - return base64.b85decode(payload) - - -def itemgetter(obj, getter=operator.itemgetter(0)): - return compat.ustr(getter(obj)) diff --git a/node_modules/arepl-backend/python/arepl_jsonpickle/version.py b/node_modules/arepl-backend/python/arepl_jsonpickle/version.py deleted file mode 100644 index 64477cf..0000000 --- a/node_modules/arepl-backend/python/arepl_jsonpickle/version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '1.2' diff --git a/node_modules/arepl-backend/python/arepl_module_logic.py b/node_modules/arepl-backend/python/arepl_module_logic.py deleted file mode 100644 index ad93ad3..0000000 --- a/node_modules/arepl-backend/python/arepl_module_logic.py +++ /dev/null @@ -1,25 +0,0 @@ -from sys import version -from sys import builtin_module_names -from sys import modules -from pkgutil import iter_modules -from arepl_stdlib_list import stdlib_list -from typing import List,Set - -def get_non_user_modules() -> Set[str]: - """returns a set of all modules not written by the user (aka all builtin and pip modules) - - Returns: - set -- set of module names - """ - # p[1] is name - pip_modules = [p[1] for p in iter_modules()] # pylint: disable=E1133 - - more_builtin_modules = stdlib_list(version[:3], fallback=True) - # more_builtin_modules contains modules in libs folder, among many others - - even_more_builtin_modules = [k for k in modules] - # how many damn modules are there??? - - return set( - pip_modules + list(builtin_module_names) + more_builtin_modules + even_more_builtin_modules - ) diff --git a/node_modules/arepl-backend/python/arepl_overloads.py b/node_modules/arepl-backend/python/arepl_overloads.py deleted file mode 100644 index ae4a31c..0000000 --- a/node_modules/arepl-backend/python/arepl_overloads.py +++ /dev/null @@ -1,89 +0,0 @@ -import inspect -from typing import Any - -""" -This file contains overloads of certain python functions for arepl purposes -For example, arepl doesn't support stdin so we overload input and help -""" - -# AREPL-vscode does not support stdin yet so help breaks it -# by overridding help with a non-stdin version we can prevent AREPL-vscode from freezing up -# just a temp fix untill AREPL-vscode supports stdin -def help_overload(arg: Any = None): - if arg is None: - print( - """Welcome to python! :) -If this is your first time using Python, you should definitely check out -the tutorial on the Internet at https://docs.python.org/3.7/tutorial/. - -AREPL uses a custom implementation of help which does not have all the features of the interpreter help. -But AREPL's help can still give you information on functions / modules / objects you pass into it.""" - ) - else: - print(arg.__doc__) - - -arepl_input_iterator = None - -# AREPL doesn't support input so we overload input -# This allows users to hardcode input by specifying a standard_input var -def input_overload(prompt: str = None) -> str: - """AREPL requires standard_input to be hardcoded, like so: standard_input = 'hello world'; print(input()). You can also hardcode standard_input as a generator or list. - - Keyword Arguments: - prompt {str} -- (default: {None}) - - Raises: - StopIteration -- if there is no more input - """ - global arepl_input_iterator - - if prompt is not None: - print(prompt) - try: - if arepl_input_iterator is not None: - try: - return next(arepl_input_iterator) - except StopIteration: - # give simple user-friendly error, we dont want users worry about error in arepl source code - raise StopIteration("There is no more input") from None - else: - - callingFrame = inspect.currentframe().f_back - standard_input = callingFrame.f_globals["standard_input"] - - if type(standard_input) is str: - arepl_input_iterator = iter([line for line in standard_input.split("\n")]) - elif callable(standard_input): - arepl_input_iterator = standard_input() - else: - arepl_input_iterator = iter([line for line in standard_input]) - - return next(arepl_input_iterator) - except KeyError: - print("AREPL requires standard_input to be hardcoded, like so: standard_input = 'hello world'; print(input())") - return "" - - -def howdoi_wrapper(query: str) -> str: - """howdoi is meant to be called from the command line - this wrapper lets it be called programatically - - Arguments: - query {str} -- search term - """ - - if query.lower() == "use arepl" or query.lower() == "arepl": - returnVal = "using AREPL is simple - just start coding and arepl will show you the final state of your variables. For more help see https://github.com/Almenon/AREPL-vscode/wiki" - else: - try: - parser = howdoi.get_parser() - except NameError as e: - # alter error to be more readable by user - e.args = ("howdoi is not installed",) - raise - - args = vars(parser.parse_args(query.split(" "))) - returnVal = howdoi.howdoi(args) - - print(returnVal) - return returnVal # not actually necessary but nice for unit testing diff --git a/node_modules/arepl-backend/python/arepl_pickler.py b/node_modules/arepl-backend/python/arepl_pickler.py deleted file mode 100644 index 300df0a..0000000 --- a/node_modules/arepl-backend/python/arepl_pickler.py +++ /dev/null @@ -1,120 +0,0 @@ -from importlib import ( - util, -) # https://stackoverflow.com/questions/39660934/error-when-using-importlib-util-to-check-for-library -from math import isnan -from types import ModuleType, FunctionType -from typing import Any, Dict, List - -import arepl_jsonpickle as jsonpickle -from arepl_custom_handlers import handlers - -##################################### -""" -This file sets up jsonpickle. Jsonpickle is used in pickle_user_vars for picking user variables. -""" -##################################### - - -class CustomPickler(jsonpickle.pickler.Pickler): - """ - encodes float values like inf / nan as strings to follow JSON spec while keeping meaning - Im doing this in custom class because handlers do not fire for floats - """ - - inf = float("inf") - negativeInf = float("-inf") - - def _flatten(self, obj): - if type(obj) == float: - if obj == self.inf: - return "Infinity" - if obj == self.negativeInf: - return "-Infinity" - if isnan(obj): - return "NaN" - return super(CustomPickler, self)._flatten(obj) - - -if util.find_spec("numpy") is not None: - try: - import arepl_jsonpickle.ext.numpy as jsonpickle_numpy - - jsonpickle_numpy.register_handlers() - except ImportError: - # todo: log ImportError - pass - -if util.find_spec("pandas") is not None: - try: - import arepl_jsonpickle.ext.pandas as jsonpickle_pandas - - jsonpickle_pandas.register_handlers() - except ImportError: - # todo: log ImportError - pass - -jsonpickle.pickler.Pickler = CustomPickler -jsonpickle.set_encoder_options("json", ensure_ascii=False) -jsonpickle.set_encoder_options("json", allow_nan=False) # nan is not deseriazable by javascript -for handler in handlers: - jsonpickle.handlers.register(handler["type"], handler["handler"]) - -specialVars = ["__doc__", "__file__", "__loader__", "__name__", "__package__", "__spec__", "arepl_store"] - - -def pickle_user_vars( - userVars: Dict[str, Any], - default_filter_vars: List[str] = [], - default_filter_types: List[str] = ["", ""], -): - - default_filter_vars += userVars.get("arepl_filter", []) - default_filter_types += userVars.get("arepl_filter_type", []) - custom_filter_function = userVars.get("arepl_filter_function", lambda x: x) - - # filter out non-user vars, no point in showing them - userVariables = { - k: v - for k, v in userVars.items() - if str(type(v)) not in default_filter_types - and k not in specialVars + ["__builtins__"] - and k not in default_filter_vars - } - - # These vars are just for filtering, no need to show to user - userVariables.pop("arepl_filter", None) - userVariables.pop("arepl_filter_type", None) - userVariables.pop("arepl_filter_function", None) - - # but we do want to show arepl_store if it has data - if userVars.get("arepl_store") is not None: - userVariables["arepl_store"] = userVars["arepl_store"] - - userVariables = custom_filter_function(userVariables) - - # json dumps cant handle any object type, so we need to use jsonpickle - # still has limitations but can handle much more - return jsonpickle.encode( - userVariables, - max_depth=100, # any depth above 245 resuls in error and anything above 100 takes too long to process - fail_safe=lambda x: "AREPL could not pickle this object", - make_refs=False, # We set this to False for more human readable output - see #115 - ) - - -def pickle_user_error(error): - - # error needs to have context/cause - # as a actual attribute so it gets pickled - originalError = error - while error: - if error.__context__: - error.context = error.__context__ - error = error.__context__ - if error.__cause__: - error.cause = error.__cause__ - error = error.__cause__ - if error.__cause__ is None and error.__context__ is None: - break - - return jsonpickle.encode(originalError, fail_safe=lambda x: "AREPL could not pickle this object") diff --git a/node_modules/arepl-backend/python/arepl_python_evaluator.py b/node_modules/arepl-backend/python/arepl_python_evaluator.py deleted file mode 100644 index 7009705..0000000 --- a/node_modules/arepl-backend/python/arepl_python_evaluator.py +++ /dev/null @@ -1,605 +0,0 @@ -from copy import deepcopy -from importlib import ( - util, -) # https://stackoverflow.com/questions/39660934/error-when-using-importlib-util-to-check-for-library -import json -import traceback -from time import time -import asyncio -import os -import ast -import astunparse -from sys import path, modules, argv, version_info, exc_info -from typing import Any, Dict, FrozenSet, Set -from contextlib import contextmanager -from arepl_module_logic import get_non_user_modules - -# do NOT use from arepl_overloads import arepl_input_iterator -# it will recreate arepl_input_iterator and we need the original -import arepl_overloads -from arepl_pickler import specialVars, pickle_user_vars, pickle_user_error -import arepl_saved as saved -from arepl_settings import get_settings, update_settings -from arepl_user_error import UserError - -if util.find_spec("howdoi") is not None: - from howdoi import howdoi # pylint: disable=import-error - -##################################### -""" -This file is the heart of AREPL. -It accepts python code through stdin, runs it, and prints out the local variables. -Along the way I check if I haved saved the locals from a previous run and use those if present -""" -##################################### - - -class ReturnInfo: - - # HALT! do NOT change this without changing corresponding type in the frontend! - # Also note that this uses camelCase because that is standard in JS frontend - def __init__( - self, - userError: str, - userVariables: dict, - execTime: float, - totalPyTime: float, - internalError: str = None, - caller = "", - lineno = -1, - done = True, - count = -1, - *args, - **kwargs - ): - """ - :param userVariables: JSON string - :param count: iteration number, used when dumping info at a specific point. - """ - self.userError = userError - self.userVariables = userVariables - self.execTime = execTime - self.totalPyTime = totalPyTime - self.internalError = internalError - self.caller = caller - self.lineno = lineno - self.done = done - self.count = count - - -if version_info[0] < 3 or (version_info[0] == 3 and version_info[1] < 5): - # need at least 3.5 for typing - exMsg = "Must be using python 3.5 or later. You are using " + str(version_info) - print(ReturnInfo("", "{}", None, None, exMsg)) - raise Exception(exMsg) - - -class ExecArgs(object): - - # HALT! do NOT change this without changing corresponding type in the frontend! <---- - # Also note that this uses camelCase because that is standard in JS frontend - def __init__(self, evalCode: str, savedCode="", filePath="", usePreviousVariables=False, *args, **kwargs): - self.savedCode = savedCode - self.evalCode = evalCode - self.filePath = filePath - self.usePreviousVariables = usePreviousVariables - # HALT! do NOT change this without changing corresponding type in the frontend! <---- - - -nonUserModules = get_non_user_modules() -origModules = frozenset(modules) - -saved.starting_locals["help"] = arepl_overloads.help_overload -saved.starting_locals["input"] = arepl_overloads.input_overload -saved.starting_locals["howdoi"] = arepl_overloads.howdoi_wrapper - -eval_locals = deepcopy(saved.starting_locals) - - -@contextmanager -def script_path(script_dir: str): - """ - Context manager for adding a dir to the sys path - and restoring it afterwards. This trick allows - relative imports to work on the target script. - if script_dir is empty function will do nothing - Slightly modified from wolf's script_path (see https://github.com/Duroktar/Wolf) - Exception-safe (os.error will not be raised) - """ - if script_dir is None or script_dir == "": - yield - else: - arepl_dir = path[0] - path[0] = script_dir - path.append(arepl_dir) - try: - original_cwd = os.getcwd() - os.chdir(script_dir) - except os.error: - # no idea why this would happen but a user got this error once - # this func is not critical to arepl so we dont want error to bubble up - pass - - try: - yield - finally: - if(path[-1] == arepl_dir): - path.pop() - path[0] = arepl_dir - try: - os.chdir(original_cwd) - except os.error: - pass - - -noGlobalVarsMsg = {"zz status": "AREPL is configured to not show global vars"} - - -# def add_var_dicts(code): -# lines = code.split("\n") -# new_lines = ["""abcdict = dict()"""] -# for lid, line in enumerate(lines): -# split_line = line.split(" ") -# new_lines.append(line) -# if len(split_line) > 2: -# if split_line[1] == "=": -# new_lines.append(f"""abcdict["{split_line[0]}_{lid}"]={split_line[0]}""") -# code = "\n".join(new_lines) - -# print(code) -# return code - - -def get_whitespace(text): - split = text.split(" ") - leading_whitespaces = 0 - for part in split: - if part == "": - leading_whitespaces += 1 - else: - break - - return text.strip(), leading_whitespaces * " " - -def assignments(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - if len(text) == 0: - return new_lines - try: - p = ast.parse(text) - except: - return new_lines - try: - body = p.body[0] - except: - return new_lines - - ass_name = body.__class__.__name__ - if ass_name != "Assign": - return new_lines - targets = body.targets[0] - # values = body.value - # targets_code = codegen.to_source(targets) - targets_code = astunparse.unparse(targets)[:-1] - # values_code = codegen.to_source(values) - # values_code = astunparse.unparse(values)[:-1] - if targets_code[0] == "(" and targets_code[-1] == ")": - targets_code = "[" + targets_code[1:-1] + "]" - - left = targets_code - if left[0] == "[" and left[-1] == "]": - left = left[1:-1] - - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}abcdict[{lineid}].append({{"{left}":deepcopy({targets_code})}})""") - - return new_lines - -def aug_assignments(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - if len(text) == 0: - return new_lines - try: - p = ast.parse(text) - except: - return new_lines - try: - body = p.body[0] - except: - return new_lines - - ass_name = body.__class__.__name__ - if ass_name != "AugAssign": - return new_lines - target = body.target - # values = body.value - # targets_code = codegen.to_source(targets) - targets_code = astunparse.unparse(target)[:-1] - # values_code = codegen.to_source(values) - # values_code = astunparse.unparse(values)[:-1] - if targets_code[0] == "(" and targets_code[-1] == ")": - targets_code = "[" + targets_code[1:-1] + "]" - - left = targets_code - if left[0] == "[" and left[-1] == "]": - left = left[1:-1] - - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}abcdict[{lineid}].append({{"{left}":deepcopy({targets_code})}})""") - - return new_lines - - -def conditions(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - tokens = text.split() - if len(tokens) < 1: - return new_lines - if tokens[0] == "if": - if text[-1] == ":": - # can be used for eval, but is not necessary, as always true - if_condition = " ".join(tokens[1:])[:-1] - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"if condition": True }})""") - - elif tokens[0] == "elif": - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"elif condition": True }})""") - - elif tokens[0] == "else" or tokens[0] == "else:": - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"else condition": True }})""") - - else: - return new_lines - return new_lines - -def returns(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - tokens = text.split() - if len(tokens) < 1: - return new_lines - if tokens[0] == "return": - if "if" in tokens: - return new_lines - return_statement = " ".join(tokens[1:]) - # new_lines.append(f"""{leading_whitespaces}abcdict[{lineid}]=[{{"return": ({return_statement}) }}]""") - new_lines.append(f"""{leading_whitespaces}abcdict[{lineid}].append({{"return": deepcopy(({return_statement})) }})""") - new_lines.append(line) - - return new_lines - -def loops(line, lineid, new_lines, indent): - max_while_loop = 5000 - text, leading_whitespaces = get_whitespace(line) - # detect for, in, and while - tokens = text.split() - if len(tokens) < 2: - return new_lines - if tokens[0] == "for": - if tokens[-1][-1] == ":": - for tokid, token in enumerate(tokens[1:]): - - if token == "in": - left = tokens[1:tokid+1] - left = " ".join(left) - targets_code = left - if len(targets_code.split(",")) > 1 and targets_code[0] != "(": - targets_code = "(" + targets_code + ")" - - if targets_code[0] == "(" and targets_code[-1] == ")": - targets_code = "[" + targets_code[1:-1] + "]" - - if left[0] == "(" and left[-1] == ")": - left = left[1:-1] - - - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"{left}": deepcopy({targets_code}) }})""") - #new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}]=[{{"{left}": ({left}) }}]""") - break - - elif tokens[0] == "while": - new_lines.append(f"""{leading_whitespaces}infloopcounter72{lineid} = 0""") - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"while condition": True }})""") - new_lines.append(f"""{leading_whitespaces}{indent}infloopcounter72{lineid} += 1""") - new_lines.append(f"""{leading_whitespaces}{indent}if infloopcounter72{lineid} > {max_while_loop}: raise Exception("Infinite while loop")""") - - - return new_lines - -def params(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - if len(text) == 0: - return new_lines - tokens = text.split() - if len(tokens) == 0: - return new_lines - if tokens[0] != "def": - return new_lines - - try: - parse_text = text + f"\n{indent}pass" - p = ast.parse(parse_text) - args = p.body[0].args.args - arglist = "" - for arg in args: - arglist += arg.arg - arglist += ", " - arglist = arglist[:-2] - arglist_in_list = "[" + arglist + "]" - - - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}{indent}abcdict[{lineid}].append({{"{arglist}":deepcopy({arglist_in_list})}})""") - return new_lines - - except: - return new_lines - - - - - -def appends(line, lineid, new_lines, indent): - text, leading_whitespaces = get_whitespace(line) - if len(text) == 0: - return new_lines - tokens = text.split() - if len(tokens) == 0: - return new_lines - if "append" not in tokens[0] and "extend" not in tokens[0]: - return new_lines - - - parse_text = text - - try: - p = ast.parse(parse_text) - if p.body[0].value.func.attr == "append" or p.body[0].value.func.attr == "extend": - left_ast = p.body[0].value.func.value - - left = astunparse.unparse(left_ast)[:-1] - - - new_lines.append(line) - new_lines.append(f"""{leading_whitespaces}abcdict[{lineid}].append({{"{left}":deepcopy({left})}})""") - return new_lines - else: - return new_lines - - except: - return new_lines - - -def find_indent(lines): - spaces = [] - for line in lines: - if len(line) == 0: - continue - text, leading_whitespaces = get_whitespace(line) - if len(text) > 0: - spaces.append(len(leading_whitespaces)) - spaces.sort() - indent = 4 - for space in spaces: - if space > 0: - indent = space - break - return indent * " " - - - - - - -def remove_empty_lines(lines): - for i in range(len(lines) -1, -1, -1 ): - if lines[i] == "": - lines.pop() - else: - break - - - return lines - - - - -def add_var_dicts(code): - lines = code.split("\r\n") - new_lines = ["""from collections import defaultdict"""] - new_lines.append("""from copy import deepcopy""") - new_lines.append("""abcdict = defaultdict(list)""") - lines = remove_empty_lines(lines) - nlines = len(lines) - new_lines.append(f"""abcdict["nlines"] = {nlines}""") - indent = find_indent(lines) - - for lineid, line in enumerate(lines): - cur_len = len(new_lines) - - new_lines = assignments(line, lineid, new_lines, indent) - new_lines = aug_assignments(line, lineid, new_lines, indent) - new_lines = conditions(line, lineid, new_lines, indent) - new_lines = returns(line, lineid, new_lines, indent) - new_lines = loops(line, lineid, new_lines, indent) - new_lines = params(line, lineid, new_lines, indent) - new_lines = appends(line, lineid, new_lines, indent) - - if len(new_lines) == cur_len: - new_lines.append(line) - - - code = "\r\n".join(new_lines) - - - return code - - - - -# def add_vars(line, lineid, new_lines): -# avoid = ["if", "else", "elif", "while", ":", '"', "'", ".", ] -# text, whitespace = get_whitespace(line) -# if "=" not in text: -# return new_lines - -# splitted = text.split("=") -# left = splitted[0] - -# for av in avoid: -# if av in left: -# return new_lines - - - - - - - # return new_lines - -# def add_var_dicts(code): -# lines = code.split("\r\n") -# new_lines = ["""abcdict = dict()"""] -# nlines = len(lines) -# new_lines.append(f"""abcdict["nlines"] = {nlines}""") - -# for lid, line in enumerate(lines): -# split_line = line.split(" ") - -# new_lines.append(line) -# if len(split_line) > 2: -# if split_line[1] == "=": -# new_lines.append(f"""abcdict[{lid}]=[{{"{split_line[0]}":{split_line[0]}}}]""") -# code = "\r\n".join(new_lines) - -# print(code) -# print(new_lines) - -# return code - - - - - - -def exec_input(exec_args: ExecArgs): - """ - returns info about the executed code (local vars, errors, and timing) - :rtype: returnInfo - """ - global eval_locals - - argv[0] = exec_args.filePath # see https://docs.python.org/3/library/sys.html#sys.argv - saved.starting_locals["__file__"] = exec_args.filePath - if(exec_args.filePath): - saved.starting_locals["__loader__"].path = os.path.basename(exec_args.filePath) - - if not exec_args.usePreviousVariables: - eval_locals = saved.get_eval_locals(exec_args.savedCode) - - # re-import imports. (pickling imports from saved code was unfortunately not possible) - exec_args.evalCode = saved.copy_saved_imports_to_exec(exec_args.evalCode, exec_args.savedCode) - - # repoen revent loop in case user closed it in last run - asyncio.set_event_loop(asyncio.new_event_loop()) - - exec_args.evalCode = add_var_dicts(exec_args.evalCode) - - with script_path(os.path.dirname(exec_args.filePath)): - try: - start = time() - exec(exec_args.evalCode, eval_locals) - execTime = time() - start - except BaseException: - execTime = time() - start - _, exc_obj, exc_tb = exc_info() - if not get_settings().showGlobalVars: - raise UserError(exc_obj, exc_tb, noGlobalVarsMsg, execTime) - else: - raise UserError(exc_obj, exc_tb, eval_locals, execTime) - - finally: - - saved.arepl_store = eval_locals.get("arepl_store") - - try: - # arepl_dump library keeps state internally - # because python caches imports the state is kept inbetween runs - # we do not want that, arepl_dump should reset each run - del modules["arepl_dump"] - except KeyError: - pass # they have not imported it, whatever - - importedModules = set(modules) - origModules - userModules = importedModules - nonUserModules - - # user might have changed user module inbetween arepl runs - # so we clear them to reload import each time - for userModule in userModules: - try: - # #70: nonUserModules does not list submodules - # so we have to extract base module and use that - # to skip any nonUserModules - baseModule = userModule.split(".")[0] - if len(baseModule) > 1: - if baseModule in nonUserModules: - continue - del modules[userModule] - except KeyError: - pass # it's not worth failing AREPL over - - # clear mock stdin for next run - arepl_overloads.arepl_input_iterator = None - - if get_settings().showGlobalVars: - userVariables = pickle_user_vars( - eval_locals, get_settings().default_filter_vars, get_settings().default_filter_types - ) - else: - userVariables = pickle_user_vars( - noGlobalVarsMsg, get_settings().default_filter_vars, get_settings().default_filter_types - ) - - return ReturnInfo("", userVariables, execTime, None) - - -def print_output(output: object): - """ - turns output into JSON and prints it - """ - # 6q3co7 signifies to frontend that stdout is not due to a print in user's code - print("6q3co7" + json.dumps(output, default=lambda x: x.__dict__)) - - -def main(json_input: str): - data = json.loads(json_input) - execArgs = ExecArgs(**data) - update_settings(data) - - start = time() - return_info = ReturnInfo("", "{}", None, None) - - try: - return_info = exec_input(execArgs) - except (KeyboardInterrupt, SystemExit): - raise - except UserError as e: - return_info.userError = pickle_user_error(e.traceback_exception) - return_info.userErrorMsg = e.friendly_message - return_info.userVariables = e.varsSoFar - return_info.execTime = e.execTime - except Exception as e: - return_info.internalError = "Sorry, AREPL has ran into an error\n\n" + traceback.format_exc() - - return_info.totalPyTime = time() - start - - print_output(return_info) - return return_info - - -if __name__ == "__main__": - while True: - main(input()) diff --git a/node_modules/arepl-backend/python/arepl_saved.py b/node_modules/arepl-backend/python/arepl_saved.py deleted file mode 100644 index 81fc77b..0000000 --- a/node_modules/arepl-backend/python/arepl_saved.py +++ /dev/null @@ -1,119 +0,0 @@ -import ast -from copy import deepcopy -import traceback -from arepl_pickler import pickle_user_vars, specialVars -from arepl_user_error import UserError -from sys import exc_info -from typing import Any, Dict, List - -##################################### -""" -This file contains code for getting the saved or starting local variables for each run -Idea is user can optionally have a block of "saved" code that will retain vars each run -In practice not sure if this is actually used and its quite buggy :( -""" -##################################### - -saved_locals = {} -old_saved_lines = "" -starting_locals = {} - -# public cache var for user to store their data between runs -arepl_store = None - -# copy all special vars (we want execd code to have similar locals as actual code) -# not copying builtins cause exec adds it in -# also when specialVars is deepCopied later on deepcopy cant handle builtins anyways -for var in specialVars: - starting_locals[var] = locals()[var] - -# users code should execute under main scope -starting_locals["__name__"] = "__main__" -starting_locals["__loader__"].name = "__main__" - -# spec should not exist when executing file directly -del starting_locals["__spec__"] - - -def get_starting_locals() -> Dict[str, Any]: - starting_locals_copy = deepcopy(starting_locals) - starting_locals_copy["arepl_store"] = arepl_store - return starting_locals_copy - - -def exec_saved(savedLines: str) -> Dict[str, Any]: - saved_locals = get_starting_locals() - try: - exec(savedLines, saved_locals) - except Exception: - _, exc_obj, exc_tb = exc_info() - raise UserError(exc_obj, exc_tb, saved_locals) - - # deepcopy cant handle imported modules, so remove them - saved_locals = {k: v for k, v in saved_locals.items() if str(type(v)) != ""} - - return saved_locals - - -def get_eval_locals(savedLines: str) -> Dict[str, Any]: - """ - If savedLines is changed, rexecutes saved lines and returns resulting local variables. - If savedLines is unchanged, returns the saved locals. - If savedLines is empty, simply returns the original starting_locals. - """ - global old_saved_lines - global saved_locals - - # "saved" code we only ever run once and save locals, vs. codeToExec which we exec as the user types - # although if saved code has changed we need to re-run it - if savedLines != old_saved_lines: - saved_locals = exec_saved(savedLines) - old_saved_lines = savedLines - - if savedLines != "": - return deepcopy(saved_locals) - else: - return get_starting_locals() - - -def get_imports(parsedText: ast.AST, text: str) -> str: - """ - :param parsedText: the result of ast.parse(text) - :returns: empty string if no imports, otherwise string containing all imports - """ - - child_nodes = [l for l in ast.iter_child_nodes(parsedText)] - - imports = [] - saved_code = text.split("\n") - for node in child_nodes: - if isinstance(node, ast.Import) or isinstance(node, ast.ImportFrom): - importLine = saved_code[node.lineno - 1] - imports.append(importLine) - - imports = "\n".join(imports) - return imports - - -def copy_saved_imports_to_exec(codeToExec: str, savedLines: str) -> str: - """ - copies imports in savedLines to the top of codeToExec. - If savedLines is empty this function does nothing. - :raises: SyntaxError if err in savedLines - """ - if savedLines.strip() != "": - try: - saved_code_AST = ast.parse(savedLines) - except SyntaxError: - _, exc_obj, exc_tb = exc_info() - raise UserError(exc_obj, exc_tb) - - imports = get_imports(saved_code_AST, savedLines) - codeToExec = imports + "\n" + codeToExec - - # to make sure line # in errors is right we need to pad codeToExec with newlines - numLinesToAdd = len(savedLines.split("\n")) - len(imports.split("\n")) - for i in range(numLinesToAdd): - codeToExec = "\n" + codeToExec - - return codeToExec diff --git a/node_modules/arepl-backend/python/arepl_settings.py b/node_modules/arepl-backend/python/arepl_settings.py deleted file mode 100644 index f0203e2..0000000 --- a/node_modules/arepl-backend/python/arepl_settings.py +++ /dev/null @@ -1,26 +0,0 @@ -from typing import List - -class Settings(object): - - # HALT! do NOT change this without changing corresponding type in the frontend! <---- - # Also note that this uses camelCase because that is standard in JS frontend - def __init__(self, showGlobalVars=True, default_filter_vars: List[str] = [], default_filter_types: List[str] = [], *args, **kwargs): - self.showGlobalVars = showGlobalVars - self.default_filter_vars = default_filter_vars - self.default_filter_types = default_filter_types - # HALT! do NOT change this without changing corresponding type in the frontend! <---- - - -settings = Settings() - - -def get_settings() -> Settings: - return settings - - -def update_settings(new_settings) -> None: - """ - Updates all settings - """ - global settings - settings = Settings(**new_settings) diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/__init__.py b/node_modules/arepl-backend/python/arepl_stdlib_list/__init__.py deleted file mode 100644 index ef9c604..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -from ._version import __version__ - - -import os - -base_dir = os.path.dirname(os.path.realpath(__file__)) -list_dir = os.path.join(base_dir, "lists") - -long_versions = ["2.6.9", "2.7.9", "3.2.6", "3.3.6", "3.4.3", "3.5", "3.6", "3.7", "3.8"] - -short_versions = [".".join(x.split(".")[:2]) for x in long_versions] - - -def get_canonical_version(version): - - if version in long_versions: - version = ".".join(version.split(".")[:2]) - elif version not in short_versions: - raise ValueError("No such version: {}".format(version)) - - return version - - -from .base import stdlib_list diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/_version.py b/node_modules/arepl-backend/python/arepl_stdlib_list/_version.py deleted file mode 100644 index 6a9beea..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/_version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.4.0" diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/base.py b/node_modules/arepl-backend/python/arepl_stdlib_list/base.py deleted file mode 100644 index 19b6f50..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/base.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import print_function, absolute_import - -import os -import sys - -from . import get_canonical_version, list_dir - - -def stdlib_list(version=None, fallback=False): - """ - Given a ``version``, return a ``list`` of names of the Python Standard - Libraries for that version. These names are obtained from the Sphinx inventory - file (used in :py:mod:`sphinx.ext.intersphinx`). - - :param str|None version: The version (as a string) whose list of libraries you want - (one of ``"2.6"``, ``"2.7"``, ``"3.2"``, ``"3.3"``, ``"3.4"``, ``"3.5"``, ``"3.6"``, or ``"3.7"``). - If not specified, the current version of Python will be used. - - :param bool fallback: if true and a version not supported by stdlib is passed in, it falls back to latest version - - :return: A list of standard libraries from the specified version of Python - :rtype: list - """ - - try: - version = get_canonical_version(version) if version is not None else '.'.join( - str(x) for x in sys.version_info[:2]) - except ValueError: - if fallback: - version = "3.7" - else: - raise - - module_list_file = os.path.join(list_dir, "{}.txt".format(version)) - - with open(module_list_file) as f: - result = [y for y in [x.strip() for x in f.readlines()] if y] - - return result diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/fetch.py b/node_modules/arepl-backend/python/arepl_stdlib_list/fetch.py deleted file mode 100644 index e3b196a..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/fetch.py +++ /dev/null @@ -1,71 +0,0 @@ -import os -import warnings - -from sphinx.ext.intersphinx import fetch_inventory - -from . import base_dir, get_canonical_version, short_versions, list_dir - - -class DummyConfig(object): - def __init__(self, intersphinx_mapping=None, intersphinx_cache_limit=5, intersphinx_timeout=None): - self.intersphinx_mapping = intersphinx_mapping or {} - self.intersphinx_cache_limit = intersphinx_cache_limit - self.intersphinx_timeout = intersphinx_timeout - self.tls_verify = True - - -class DummyApp(object): - """ - Dummy app object for `fetch_inventory`_ to work. - - .. _fetch_inventory: https://github.com/sphinx-doc/sphinx/blob/64665f136b781426c526877283f30b690c1fa074/sphinx/ext/intersphinx.py#L125 - """ - - def __init__(self): - self.srcdir = base_dir - self.warn = warnings.warn - - self.config = DummyConfig() - - def info(self, msg): - print("DummyApp.info: {}".format(msg)) - - -def fetch_list(version=None): - """ - For the given version of Python (or all versions if no version is set), this function: - - - Uses the `fetch_inventory` function of :py:mod`sphinx.ext.intersphinx` to - grab and parse the Sphinx object inventory - (ie ``http://docs.python.org//objects.inv``) for the given version. - - - Grabs the names of all of the modules in the parsed inventory data. - - - Writes the sorted list of module names to file (within the `lists` subfolder). - - :param str|None version: A specified version of Python. If not specified, then all - available versions of Python will have their inventory objects fetched - and parsed, and have their module names written to file. - (one of ``"2.6"``, ``"2.7"``, ``"3.2"``, ``"3.3"``, ``"3.4"``, ``"3.5"``, or ``None``) - - """ - - if version is None: - versions = short_versions - else: - versions = [get_canonical_version(version)] - - for version in versions: - - url = "http://docs.python.org/{}/objects.inv".format(version) - - modules = sorted( - list( - fetch_inventory(DummyApp(), "", url).get("py:module").keys() - ) - ) - - with open(os.path.join(list_dir, "{}.txt".format(version)), "w") as f: - for module in modules: - f.write(module) - f.write("\n") diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.2.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.2.txt deleted file mode 100644 index cf3152a..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.2.txt +++ /dev/null @@ -1,300 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -colorsys -compileall -concurrent.futures -configparser -contextlib -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.emxccompiler -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.encoders -email.errors -email.generator -email.header -email.iterators -email.message -email.mime -email.parser -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -errno -fcntl -filecmp -fileinput -fnmatch -formatter -fpectl -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.util -inspect -io -itertools -json -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -select -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tty -turtle -types -unicodedata -unittest -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipfile -zipimport -zlib diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.3.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.3.txt deleted file mode 100644 index c480ee3..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.3.txt +++ /dev/null @@ -1,309 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent.futures -configparser -contextlib -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.emxccompiler -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.encoders -email.errors -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.parser -email.policy -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fpectl -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.util -inspect -io -ipaddress -itertools -json -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -lzma -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -select -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tty -turtle -types -unicodedata -unittest -unittest.mock -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipfile -zipimport -zlib diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.4.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.4.txt deleted file mode 100644 index 9728674..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.4.txt +++ /dev/null @@ -1,317 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncio -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent.futures -configparser -contextlib -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.contentmanager -email.encoders -email.errors -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.parser -email.policy -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -ensurepip -enum -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fpectl -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.util -inspect -io -ipaddress -itertools -json -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -lzma -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pathlib -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -select -selectors -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -statistics -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tracemalloc -tty -turtle -turtledemo -types -unicodedata -unittest -unittest.mock -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipfile -zipimport -zlib diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.5.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.5.txt deleted file mode 100644 index 53402e3..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.5.txt +++ /dev/null @@ -1,321 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncio -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent.futures -configparser -contextlib -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.contentmanager -email.encoders -email.errors -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.parser -email.policy -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -ensurepip -enum -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fpectl -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.util -inspect -io -ipaddress -itertools -json -json.tool -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -lzma -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pathlib -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -select -selectors -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -statistics -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tracemalloc -tty -turtle -turtledemo -types -typing -unicodedata -unittest -unittest.mock -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipapp -zipfile -zipimport -zlib diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.6.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.6.txt deleted file mode 100644 index 9421674..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.6.txt +++ /dev/null @@ -1,322 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncio -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent.futures -configparser -contextlib -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.contentmanager -email.encoders -email.errors -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.parser -email.policy -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -ensurepip -enum -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fpectl -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.util -inspect -io -ipaddress -itertools -json -json.tool -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -lzma -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pathlib -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -secrets -select -selectors -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -statistics -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tracemalloc -tty -turtle -turtledemo -types -typing -unicodedata -unittest -unittest.mock -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipapp -zipfile -zipimport -zlib diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.7.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.7.txt deleted file mode 100644 index dba36cb..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.7.txt +++ /dev/null @@ -1,325 +0,0 @@ -__future__ -__main__ -_dummy_thread -_thread -abc -aifc -argparse -array -ast -asynchat -asyncio -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent.futures -configparser -contextlib -contextvars -copy -copyreg -crypt -csv -ctypes -curses -curses.ascii -curses.panel -curses.textpad -dataclasses -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -doctest -dummy_threading -email -email.charset -email.contentmanager -email.encoders -email.errors -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.parser -email.policy -email.utils -encodings.idna -encodings.mbcs -encodings.utf_8_sig -ensurepip -enum -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fractions -ftplib -functools -gc -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http -http.client -http.cookiejar -http.cookies -http.server -imaplib -imghdr -imp -importlib -importlib.abc -importlib.machinery -importlib.resources -importlib.util -inspect -io -ipaddress -itertools -json -json.tool -keyword -lib2to3 -linecache -locale -logging -logging.config -logging.handlers -lzma -macpath -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.dummy -multiprocessing.managers -multiprocessing.pool -multiprocessing.sharedctypes -netrc -nis -nntplib -numbers -operator -optparse -os -os.path -ossaudiodev -parser -pathlib -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -secrets -select -selectors -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -ssl -stat -statistics -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.support -test.support.script_helper -textwrap -threading -time -timeit -tkinter -tkinter.scrolledtext -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tracemalloc -tty -turtle -turtledemo -types -typing -unicodedata -unittest -unittest.mock -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.minidom -xml.dom.pulldom -xml.etree.ElementTree -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc.client -xmlrpc.server -zipapp -zipfile -zipimport -zlib \ No newline at end of file diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.8.txt b/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.8.txt deleted file mode 100644 index 7920412..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/lists/3.8.txt +++ /dev/null @@ -1,1766 +0,0 @@ -__future__ -__main__ -_abc -_ast -_asyncio -_bisect -_blake2 -_bootlocale -_bz2 -_codecs -_codecs_cn -_codecs_hk -_codecs_iso2022 -_codecs_jp -_codecs_kr -_codecs_tw -_collections -_collections_abc -_compat_pickle -_compression -_contextvars -_crypt -_csv -_ctypes -_ctypes_test -_curses -_curses_panel -_datetime -_dbm -_decimal -_dummy_thread -_elementtree -_frozen_importlib -_frozen_importlib_external -_functools -_gdbm -_hashlib -_heapq -_imp -_io -_json -_locale -_lsprof -_lzma -_markupbase -_md5 -_multibytecodec -_multiprocessing -_opcode -_operator -_osx_support -_pickle -_posixshmem -_posixsubprocess -_py_abc -_pydecimal -_pyio -_queue -_random -_sha1 -_sha256 -_sha3 -_sha512 -_signal -_sitebuiltins -_socket -_sqlite3 -_sre -_ssl -_stat -_statistics -_string -_strptime -_struct -_symtable -_testbuffer -_testcapi -_testimportmultiple -_testinternalcapi -_testmultiphase -_thread -_threading_local -_tkinter -_tracemalloc -_uuid -_warnings -_weakref -_weakrefset -_xxsubinterpreters -_xxtestfuzz -abc -aifc -antigravity -argparse -array -ast -asynchat -asyncio -asyncio.__main__ -asyncio.base_events -asyncio.base_futures -asyncio.base_subprocess -asyncio.base_tasks -asyncio.constants -asyncio.coroutines -asyncio.events -asyncio.exceptions -asyncio.format_helpers -asyncio.futures -asyncio.locks -asyncio.log -asyncio.proactor_events -asyncio.protocols -asyncio.queues -asyncio.runners -asyncio.selector_events -asyncio.sslproto -asyncio.staggered -asyncio.streams -asyncio.subprocess -asyncio.tasks -asyncio.transports -asyncio.trsock -asyncio.unix_events -asyncio.windows_events -asyncio.windows_utils -asyncore -atexit -audioop -base64 -bdb -binascii -binhex -bisect -builtins -bz2 -cProfile -calendar -cgi -cgitb -chunk -cmath -cmd -code -codecs -codeop -collections -collections.abc -colorsys -compileall -concurrent -concurrent.futures -concurrent.futures._base -concurrent.futures.process -concurrent.futures.thread -configparser -contextlib -contextvars -copy -copyreg -crypt -csv -ctypes -ctypes._aix -ctypes._endian -ctypes.macholib -ctypes.macholib.dyld -ctypes.macholib.dylib -ctypes.macholib.framework -ctypes.test -ctypes.test.__main__ -ctypes.test.test_anon -ctypes.test.test_array_in_pointer -ctypes.test.test_arrays -ctypes.test.test_as_parameter -ctypes.test.test_bitfields -ctypes.test.test_buffers -ctypes.test.test_bytes -ctypes.test.test_byteswap -ctypes.test.test_callbacks -ctypes.test.test_cast -ctypes.test.test_cfuncs -ctypes.test.test_checkretval -ctypes.test.test_delattr -ctypes.test.test_errno -ctypes.test.test_find -ctypes.test.test_frombuffer -ctypes.test.test_funcptr -ctypes.test.test_functions -ctypes.test.test_incomplete -ctypes.test.test_init -ctypes.test.test_internals -ctypes.test.test_keeprefs -ctypes.test.test_libc -ctypes.test.test_loading -ctypes.test.test_macholib -ctypes.test.test_memfunctions -ctypes.test.test_numbers -ctypes.test.test_objects -ctypes.test.test_parameters -ctypes.test.test_pep3118 -ctypes.test.test_pickling -ctypes.test.test_pointers -ctypes.test.test_prototypes -ctypes.test.test_python_api -ctypes.test.test_random_things -ctypes.test.test_refcounts -ctypes.test.test_repr -ctypes.test.test_returnfuncptrs -ctypes.test.test_simplesubclasses -ctypes.test.test_sizes -ctypes.test.test_slicing -ctypes.test.test_stringptr -ctypes.test.test_strings -ctypes.test.test_struct_fields -ctypes.test.test_structures -ctypes.test.test_unaligned_structures -ctypes.test.test_unicode -ctypes.test.test_values -ctypes.test.test_varsize_struct -ctypes.test.test_win32 -ctypes.test.test_wintypes -ctypes.util -ctypes.wintypes -curses -curses.ascii -curses.has_key -curses.panel -curses.textpad -dataclasses -datetime -dbm -dbm.dumb -dbm.gnu -dbm.ndbm -decimal -difflib -dis -distutils -distutils._msvccompiler -distutils.archive_util -distutils.bcppcompiler -distutils.ccompiler -distutils.cmd -distutils.command -distutils.command.bdist -distutils.command.bdist_dumb -distutils.command.bdist_msi -distutils.command.bdist_packager -distutils.command.bdist_rpm -distutils.command.bdist_wininst -distutils.command.build -distutils.command.build_clib -distutils.command.build_ext -distutils.command.build_py -distutils.command.build_scripts -distutils.command.check -distutils.command.clean -distutils.command.config -distutils.command.install -distutils.command.install_data -distutils.command.install_egg_info -distutils.command.install_headers -distutils.command.install_lib -distutils.command.install_scripts -distutils.command.register -distutils.command.sdist -distutils.command.upload -distutils.config -distutils.core -distutils.cygwinccompiler -distutils.debug -distutils.dep_util -distutils.dir_util -distutils.dist -distutils.errors -distutils.extension -distutils.fancy_getopt -distutils.file_util -distutils.filelist -distutils.log -distutils.msvc9compiler -distutils.msvccompiler -distutils.spawn -distutils.sysconfig -distutils.tests -distutils.tests.support -distutils.tests.test_archive_util -distutils.tests.test_bdist -distutils.tests.test_bdist_dumb -distutils.tests.test_bdist_msi -distutils.tests.test_bdist_rpm -distutils.tests.test_bdist_wininst -distutils.tests.test_build -distutils.tests.test_build_clib -distutils.tests.test_build_ext -distutils.tests.test_build_py -distutils.tests.test_build_scripts -distutils.tests.test_check -distutils.tests.test_clean -distutils.tests.test_cmd -distutils.tests.test_config -distutils.tests.test_config_cmd -distutils.tests.test_core -distutils.tests.test_cygwinccompiler -distutils.tests.test_dep_util -distutils.tests.test_dir_util -distutils.tests.test_dist -distutils.tests.test_extension -distutils.tests.test_file_util -distutils.tests.test_filelist -distutils.tests.test_install -distutils.tests.test_install_data -distutils.tests.test_install_headers -distutils.tests.test_install_lib -distutils.tests.test_install_scripts -distutils.tests.test_log -distutils.tests.test_msvc9compiler -distutils.tests.test_msvccompiler -distutils.tests.test_register -distutils.tests.test_sdist -distutils.tests.test_spawn -distutils.tests.test_sysconfig -distutils.tests.test_text_file -distutils.tests.test_unixccompiler -distutils.tests.test_upload -distutils.tests.test_util -distutils.tests.test_version -distutils.tests.test_versionpredicate -distutils.text_file -distutils.unixccompiler -distutils.util -distutils.version -distutils.versionpredicate -doctest -dummy_threading -email -email._encoded_words -email._header_value_parser -email._parseaddr -email._policybase -email.base64mime -email.charset -email.contentmanager -email.encoders -email.errors -email.feedparser -email.generator -email.header -email.headerregistry -email.iterators -email.message -email.mime -email.mime.application -email.mime.audio -email.mime.base -email.mime.image -email.mime.message -email.mime.multipart -email.mime.nonmultipart -email.mime.text -email.parser -email.policy -email.quoprimime -email.utils -encodings -encodings.aliases -encodings.ascii -encodings.base64_codec -encodings.big5 -encodings.big5hkscs -encodings.bz2_codec -encodings.charmap -encodings.cp037 -encodings.cp1006 -encodings.cp1026 -encodings.cp1125 -encodings.cp1140 -encodings.cp1250 -encodings.cp1251 -encodings.cp1252 -encodings.cp1253 -encodings.cp1254 -encodings.cp1255 -encodings.cp1256 -encodings.cp1257 -encodings.cp1258 -encodings.cp273 -encodings.cp424 -encodings.cp437 -encodings.cp500 -encodings.cp720 -encodings.cp737 -encodings.cp775 -encodings.cp850 -encodings.cp852 -encodings.cp855 -encodings.cp856 -encodings.cp857 -encodings.cp858 -encodings.cp860 -encodings.cp861 -encodings.cp862 -encodings.cp863 -encodings.cp864 -encodings.cp865 -encodings.cp866 -encodings.cp869 -encodings.cp874 -encodings.cp875 -encodings.cp932 -encodings.cp949 -encodings.cp950 -encodings.euc_jis_2004 -encodings.euc_jisx0213 -encodings.euc_jp -encodings.euc_kr -encodings.gb18030 -encodings.gb2312 -encodings.gbk -encodings.hex_codec -encodings.hp_roman8 -encodings.hz -encodings.idna -encodings.iso2022_jp -encodings.iso2022_jp_1 -encodings.iso2022_jp_2 -encodings.iso2022_jp_2004 -encodings.iso2022_jp_3 -encodings.iso2022_jp_ext -encodings.iso2022_kr -encodings.iso8859_1 -encodings.iso8859_10 -encodings.iso8859_11 -encodings.iso8859_13 -encodings.iso8859_14 -encodings.iso8859_15 -encodings.iso8859_16 -encodings.iso8859_2 -encodings.iso8859_3 -encodings.iso8859_4 -encodings.iso8859_5 -encodings.iso8859_6 -encodings.iso8859_7 -encodings.iso8859_8 -encodings.iso8859_9 -encodings.johab -encodings.koi8_r -encodings.koi8_t -encodings.koi8_u -encodings.kz1048 -encodings.latin_1 -encodings.mac_arabic -encodings.mac_centeuro -encodings.mac_croatian -encodings.mac_cyrillic -encodings.mac_farsi -encodings.mac_greek -encodings.mac_iceland -encodings.mac_latin2 -encodings.mac_roman -encodings.mac_romanian -encodings.mac_turkish -encodings.mbcs -encodings.oem -encodings.palmos -encodings.ptcp154 -encodings.punycode -encodings.quopri_codec -encodings.raw_unicode_escape -encodings.rot_13 -encodings.shift_jis -encodings.shift_jis_2004 -encodings.shift_jisx0213 -encodings.tis_620 -encodings.undefined -encodings.unicode_escape -encodings.utf_16 -encodings.utf_16_be -encodings.utf_16_le -encodings.utf_32 -encodings.utf_32_be -encodings.utf_32_le -encodings.utf_7 -encodings.utf_8 -encodings.utf_8_sig -encodings.uu_codec -encodings.zlib_codec -ensurepip -ensurepip.__main__ -ensurepip._uninstall -enum -errno -faulthandler -fcntl -filecmp -fileinput -fnmatch -formatter -fractions -ftplib -functools -gc -genericpath -getopt -getpass -gettext -glob -grp -gzip -hashlib -heapq -hmac -html -html.entities -html.parser -http -http.client -http.cookiejar -http.cookies -http.server -idlelib -idlelib.__main__ -idlelib.autocomplete -idlelib.autocomplete_w -idlelib.autoexpand -idlelib.browser -idlelib.calltip -idlelib.calltip_w -idlelib.codecontext -idlelib.colorizer -idlelib.config -idlelib.config_key -idlelib.configdialog -idlelib.debugger -idlelib.debugger_r -idlelib.debugobj -idlelib.debugobj_r -idlelib.delegator -idlelib.dynoption -idlelib.editor -idlelib.filelist -idlelib.format -idlelib.grep -idlelib.help -idlelib.help_about -idlelib.history -idlelib.hyperparser -idlelib.idle -idlelib.idle_test -idlelib.idle_test.htest -idlelib.idle_test.mock_idle -idlelib.idle_test.mock_tk -idlelib.idle_test.template -idlelib.idle_test.test_autocomplete -idlelib.idle_test.test_autocomplete_w -idlelib.idle_test.test_autoexpand -idlelib.idle_test.test_browser -idlelib.idle_test.test_calltip -idlelib.idle_test.test_calltip_w -idlelib.idle_test.test_codecontext -idlelib.idle_test.test_colorizer -idlelib.idle_test.test_config -idlelib.idle_test.test_config_key -idlelib.idle_test.test_configdialog -idlelib.idle_test.test_debugger -idlelib.idle_test.test_debugger_r -idlelib.idle_test.test_debugobj -idlelib.idle_test.test_debugobj_r -idlelib.idle_test.test_delegator -idlelib.idle_test.test_editmenu -idlelib.idle_test.test_editor -idlelib.idle_test.test_filelist -idlelib.idle_test.test_format -idlelib.idle_test.test_grep -idlelib.idle_test.test_help -idlelib.idle_test.test_help_about -idlelib.idle_test.test_history -idlelib.idle_test.test_hyperparser -idlelib.idle_test.test_iomenu -idlelib.idle_test.test_macosx -idlelib.idle_test.test_mainmenu -idlelib.idle_test.test_multicall -idlelib.idle_test.test_outwin -idlelib.idle_test.test_parenmatch -idlelib.idle_test.test_pathbrowser -idlelib.idle_test.test_percolator -idlelib.idle_test.test_pyparse -idlelib.idle_test.test_pyshell -idlelib.idle_test.test_query -idlelib.idle_test.test_redirector -idlelib.idle_test.test_replace -idlelib.idle_test.test_rpc -idlelib.idle_test.test_run -idlelib.idle_test.test_runscript -idlelib.idle_test.test_scrolledlist -idlelib.idle_test.test_search -idlelib.idle_test.test_searchbase -idlelib.idle_test.test_searchengine -idlelib.idle_test.test_sidebar -idlelib.idle_test.test_squeezer -idlelib.idle_test.test_stackviewer -idlelib.idle_test.test_statusbar -idlelib.idle_test.test_text -idlelib.idle_test.test_textview -idlelib.idle_test.test_tooltip -idlelib.idle_test.test_tree -idlelib.idle_test.test_undo -idlelib.idle_test.test_warning -idlelib.idle_test.test_window -idlelib.idle_test.test_zoomheight -idlelib.iomenu -idlelib.macosx -idlelib.mainmenu -idlelib.multicall -idlelib.outwin -idlelib.parenmatch -idlelib.pathbrowser -idlelib.percolator -idlelib.pyparse -idlelib.pyshell -idlelib.query -idlelib.redirector -idlelib.replace -idlelib.rpc -idlelib.run -idlelib.runscript -idlelib.scrolledlist -idlelib.search -idlelib.searchbase -idlelib.searchengine -idlelib.sidebar -idlelib.squeezer -idlelib.stackviewer -idlelib.statusbar -idlelib.textview -idlelib.tooltip -idlelib.tree -idlelib.undo -idlelib.window -idlelib.zoomheight -idlelib.zzdummy -imaplib -imghdr -imp -importlib -importlib._bootstrap -importlib._bootstrap_external -importlib.abc -importlib.machinery -importlib.metadata -importlib.resources -importlib.util -inspect -io -ipaddress -itertools -json -json.decoder -json.encoder -json.scanner -json.tool -keyword -lib2to3 -lib2to3.__main__ -lib2to3.btm_matcher -lib2to3.btm_utils -lib2to3.fixer_base -lib2to3.fixer_util -lib2to3.fixes -lib2to3.fixes.fix_apply -lib2to3.fixes.fix_asserts -lib2to3.fixes.fix_basestring -lib2to3.fixes.fix_buffer -lib2to3.fixes.fix_dict -lib2to3.fixes.fix_except -lib2to3.fixes.fix_exec -lib2to3.fixes.fix_execfile -lib2to3.fixes.fix_exitfunc -lib2to3.fixes.fix_filter -lib2to3.fixes.fix_funcattrs -lib2to3.fixes.fix_future -lib2to3.fixes.fix_getcwdu -lib2to3.fixes.fix_has_key -lib2to3.fixes.fix_idioms -lib2to3.fixes.fix_import -lib2to3.fixes.fix_imports -lib2to3.fixes.fix_imports2 -lib2to3.fixes.fix_input -lib2to3.fixes.fix_intern -lib2to3.fixes.fix_isinstance -lib2to3.fixes.fix_itertools -lib2to3.fixes.fix_itertools_imports -lib2to3.fixes.fix_long -lib2to3.fixes.fix_map -lib2to3.fixes.fix_metaclass -lib2to3.fixes.fix_methodattrs -lib2to3.fixes.fix_ne -lib2to3.fixes.fix_next -lib2to3.fixes.fix_nonzero -lib2to3.fixes.fix_numliterals -lib2to3.fixes.fix_operator -lib2to3.fixes.fix_paren -lib2to3.fixes.fix_print -lib2to3.fixes.fix_raise -lib2to3.fixes.fix_raw_input -lib2to3.fixes.fix_reduce -lib2to3.fixes.fix_reload -lib2to3.fixes.fix_renames -lib2to3.fixes.fix_repr -lib2to3.fixes.fix_set_literal -lib2to3.fixes.fix_standarderror -lib2to3.fixes.fix_sys_exc -lib2to3.fixes.fix_throw -lib2to3.fixes.fix_tuple_params -lib2to3.fixes.fix_types -lib2to3.fixes.fix_unicode -lib2to3.fixes.fix_urllib -lib2to3.fixes.fix_ws_comma -lib2to3.fixes.fix_xrange -lib2to3.fixes.fix_xreadlines -lib2to3.fixes.fix_zip -lib2to3.main -lib2to3.patcomp -lib2to3.pgen2 -lib2to3.pgen2.conv -lib2to3.pgen2.driver -lib2to3.pgen2.grammar -lib2to3.pgen2.literals -lib2to3.pgen2.parse -lib2to3.pgen2.pgen -lib2to3.pgen2.token -lib2to3.pgen2.tokenize -lib2to3.pygram -lib2to3.pytree -lib2to3.refactor -lib2to3.tests -lib2to3.tests.__main__ -lib2to3.tests.data.bom -lib2to3.tests.data.crlf -lib2to3.tests.data.different_encoding -lib2to3.tests.data.false_encoding -lib2to3.tests.data.fixers.bad_order -lib2to3.tests.data.fixers.myfixes -lib2to3.tests.data.fixers.myfixes.fix_explicit -lib2to3.tests.data.fixers.myfixes.fix_first -lib2to3.tests.data.fixers.myfixes.fix_last -lib2to3.tests.data.fixers.myfixes.fix_parrot -lib2to3.tests.data.fixers.myfixes.fix_preorder -lib2to3.tests.data.fixers.no_fixer_cls -lib2to3.tests.data.fixers.parrot_example -lib2to3.tests.data.infinite_recursion -lib2to3.tests.data.py2_test_grammar -lib2to3.tests.data.py3_test_grammar -lib2to3.tests.pytree_idempotency -lib2to3.tests.support -lib2to3.tests.test_all_fixers -lib2to3.tests.test_fixers -lib2to3.tests.test_main -lib2to3.tests.test_parser -lib2to3.tests.test_pytree -lib2to3.tests.test_refactor -lib2to3.tests.test_util -linecache -locale -logging -logging.config -logging.handlers -lzma -mailbox -mailcap -marshal -math -mimetypes -mmap -modulefinder -msilib -msvcrt -multiprocessing -multiprocessing.connection -multiprocessing.context -multiprocessing.dummy -multiprocessing.dummy.connection -multiprocessing.forkserver -multiprocessing.heap -multiprocessing.managers -multiprocessing.pool -multiprocessing.popen_fork -multiprocessing.popen_forkserver -multiprocessing.popen_spawn_posix -multiprocessing.popen_spawn_win32 -multiprocessing.process -multiprocessing.queues -multiprocessing.reduction -multiprocessing.resource_sharer -multiprocessing.resource_tracker -multiprocessing.shared_memory -multiprocessing.sharedctypes -multiprocessing.spawn -multiprocessing.synchronize -multiprocessing.util -netrc -nis -nntplib -ntpath -nturl2path -numbers -opcode -operator -optparse -os -os.path -ossaudiodev -parser -pathlib -pdb -pickle -pickletools -pipes -pkgutil -platform -plistlib -poplib -posix -posixpath -pprint -profile -pstats -pty -pwd -py_compile -pyclbr -pydoc -pydoc_data -pydoc_data.topics -pyexpat -queue -quopri -random -re -readline -reprlib -resource -rlcompleter -runpy -sched -secrets -select -selectors -shelve -shlex -shutil -signal -site -smtpd -smtplib -sndhdr -socket -socketserver -spwd -sqlite3 -sqlite3.dbapi2 -sqlite3.dump -sqlite3.test -sqlite3.test.backup -sqlite3.test.dbapi -sqlite3.test.dump -sqlite3.test.factory -sqlite3.test.hooks -sqlite3.test.regression -sqlite3.test.transactions -sqlite3.test.types -sqlite3.test.userfunctions -sre_compile -sre_constants -sre_parse -ssl -stat -statistics -string -stringprep -struct -subprocess -sunau -symbol -symtable -sys -sysconfig -syslog -tabnanny -tarfile -telnetlib -tempfile -termios -test -test.__main__ -test._test_multiprocessing -test.ann_module -test.ann_module2 -test.ann_module3 -test.audiotests -test.autotest -test.bad_coding -test.bad_coding2 -test.bad_getattr -test.bad_getattr2 -test.bad_getattr3 -test.badsyntax_3131 -test.badsyntax_future10 -test.badsyntax_future3 -test.badsyntax_future4 -test.badsyntax_future5 -test.badsyntax_future6 -test.badsyntax_future7 -test.badsyntax_future8 -test.badsyntax_future9 -test.badsyntax_pep3120 -test.bisect_cmd -test.bytecode_helper -test.coding20731 -test.curses_tests -test.dataclass_module_1 -test.dataclass_module_1_str -test.dataclass_module_2 -test.dataclass_module_2_str -test.datetimetester -test.dis_module -test.doctest_aliases -test.double_const -test.dtracedata.call_stack -test.dtracedata.gc -test.dtracedata.instance -test.dtracedata.line -test.eintrdata.eintr_tester -test.encoded_modules -test.encoded_modules.module_iso_8859_1 -test.encoded_modules.module_koi8_r -test.final_a -test.final_b -test.fork_wait -test.future_test1 -test.future_test2 -test.gdb_sample -test.good_getattr -test.imp_dummy -test.inspect_fodder -test.inspect_fodder2 -test.libregrtest -test.libregrtest.cmdline -test.libregrtest.main -test.libregrtest.pgo -test.libregrtest.refleak -test.libregrtest.runtest -test.libregrtest.runtest_mp -test.libregrtest.save_env -test.libregrtest.setup -test.libregrtest.utils -test.libregrtest.win_utils -test.list_tests -test.lock_tests -test.make_ssl_certs -test.mapping_tests -test.memory_watchdog -test.mock_socket -test.mod_generics_cache -test.mp_fork_bomb -test.mp_preload -test.multibytecodec_support -test.outstanding_bugs -test.pickletester -test.profilee -test.pyclbr_input -test.pydoc_mod -test.pydocfodder -test.pythoninfo -test.re_tests -test.regrtest -test.relimport -test.reperf -test.sample_doctest -test.sample_doctest_no_docstrings -test.sample_doctest_no_doctests -test.seq_tests -test.signalinterproctester -test.sortperf -test.ssl_servers -test.ssltests -test.string_tests -test.subprocessdata.fd_status -test.subprocessdata.input_reader -test.subprocessdata.qcat -test.subprocessdata.qgrep -test.subprocessdata.sigchild_ignore -test.support -test.support.script_helper -test.support.testresult -test.test___all__ -test.test___future__ -test.test__locale -test.test__opcode -test.test__osx_support -test.test__xxsubinterpreters -test.test_abc -test.test_abstract_numbers -test.test_aifc -test.test_argparse -test.test_array -test.test_asdl_parser -test.test_ast -test.test_asyncgen -test.test_asynchat -test.test_asyncio -test.test_asyncio.__main__ -test.test_asyncio.echo -test.test_asyncio.echo2 -test.test_asyncio.echo3 -test.test_asyncio.functional -test.test_asyncio.test_base_events -test.test_asyncio.test_buffered_proto -test.test_asyncio.test_context -test.test_asyncio.test_events -test.test_asyncio.test_futures -test.test_asyncio.test_locks -test.test_asyncio.test_pep492 -test.test_asyncio.test_proactor_events -test.test_asyncio.test_protocols -test.test_asyncio.test_queues -test.test_asyncio.test_runners -test.test_asyncio.test_selector_events -test.test_asyncio.test_sendfile -test.test_asyncio.test_server -test.test_asyncio.test_sock_lowlevel -test.test_asyncio.test_sslproto -test.test_asyncio.test_streams -test.test_asyncio.test_subprocess -test.test_asyncio.test_tasks -test.test_asyncio.test_transports -test.test_asyncio.test_unix_events -test.test_asyncio.test_windows_events -test.test_asyncio.test_windows_utils -test.test_asyncio.utils -test.test_asyncore -test.test_atexit -test.test_audioop -test.test_audit -test.test_augassign -test.test_base64 -test.test_baseexception -test.test_bdb -test.test_bigaddrspace -test.test_bigmem -test.test_binascii -test.test_binhex -test.test_binop -test.test_bisect -test.test_bool -test.test_buffer -test.test_bufio -test.test_builtin -test.test_bytes -test.test_bz2 -test.test_c_locale_coercion -test.test_calendar -test.test_call -test.test_capi -test.test_cgi -test.test_cgitb -test.test_charmapcodec -test.test_class -test.test_clinic -test.test_cmath -test.test_cmd -test.test_cmd_line -test.test_cmd_line_script -test.test_code -test.test_code_module -test.test_codeccallbacks -test.test_codecencodings_cn -test.test_codecencodings_hk -test.test_codecencodings_iso2022 -test.test_codecencodings_jp -test.test_codecencodings_kr -test.test_codecencodings_tw -test.test_codecmaps_cn -test.test_codecmaps_hk -test.test_codecmaps_jp -test.test_codecmaps_kr -test.test_codecmaps_tw -test.test_codecs -test.test_codeop -test.test_collections -test.test_colorsys -test.test_compare -test.test_compile -test.test_compileall -test.test_complex -test.test_concurrent_futures -test.test_configparser -test.test_contains -test.test_context -test.test_contextlib -test.test_contextlib_async -test.test_copy -test.test_copyreg -test.test_coroutines -test.test_cprofile -test.test_crashers -test.test_crypt -test.test_csv -test.test_ctypes -test.test_curses -test.test_dataclasses -test.test_datetime -test.test_dbm -test.test_dbm_dumb -test.test_dbm_gnu -test.test_dbm_ndbm -test.test_decimal -test.test_decorators -test.test_defaultdict -test.test_deque -test.test_descr -test.test_descrtut -test.test_devpoll -test.test_dict -test.test_dict_version -test.test_dictcomps -test.test_dictviews -test.test_difflib -test.test_dis -test.test_distutils -test.test_doctest -test.test_doctest2 -test.test_docxmlrpc -test.test_dtrace -test.test_dummy_thread -test.test_dummy_threading -test.test_dynamic -test.test_dynamicclassattribute -test.test_eintr -test.test_email -test.test_email.__main__ -test.test_email.test__encoded_words -test.test_email.test__header_value_parser -test.test_email.test_asian_codecs -test.test_email.test_contentmanager -test.test_email.test_defect_handling -test.test_email.test_email -test.test_email.test_generator -test.test_email.test_headerregistry -test.test_email.test_inversion -test.test_email.test_message -test.test_email.test_parser -test.test_email.test_pickleable -test.test_email.test_policy -test.test_email.test_utils -test.test_email.torture_test -test.test_embed -test.test_ensurepip -test.test_enum -test.test_enumerate -test.test_eof -test.test_epoll -test.test_errno -test.test_exception_hierarchy -test.test_exception_variations -test.test_exceptions -test.test_extcall -test.test_faulthandler -test.test_fcntl -test.test_file -test.test_file_eintr -test.test_filecmp -test.test_fileinput -test.test_fileio -test.test_finalization -test.test_float -test.test_flufl -test.test_fnmatch -test.test_fork1 -test.test_format -test.test_fractions -test.test_frame -test.test_frozen -test.test_fstring -test.test_ftplib -test.test_funcattrs -test.test_functools -test.test_future -test.test_future3 -test.test_future4 -test.test_future5 -test.test_gc -test.test_gdb -test.test_generator_stop -test.test_generators -test.test_genericclass -test.test_genericpath -test.test_genexps -test.test_getargs2 -test.test_getopt -test.test_getpass -test.test_gettext -test.test_glob -test.test_global -test.test_grammar -test.test_grp -test.test_gzip -test.test_hash -test.test_hashlib -test.test_heapq -test.test_hmac -test.test_html -test.test_htmlparser -test.test_http_cookiejar -test.test_http_cookies -test.test_httplib -test.test_httpservers -test.test_idle -test.test_imaplib -test.test_imghdr -test.test_imp -test.test_import -test.test_import.__main__ -test.test_import.data.circular_imports.basic -test.test_import.data.circular_imports.basic2 -test.test_import.data.circular_imports.binding -test.test_import.data.circular_imports.binding2 -test.test_import.data.circular_imports.from_cycle1 -test.test_import.data.circular_imports.from_cycle2 -test.test_import.data.circular_imports.indirect -test.test_import.data.circular_imports.rebinding -test.test_import.data.circular_imports.rebinding2 -test.test_import.data.circular_imports.source -test.test_import.data.circular_imports.subpackage -test.test_import.data.circular_imports.subpkg.subpackage2 -test.test_import.data.circular_imports.subpkg.util -test.test_import.data.circular_imports.use -test.test_import.data.circular_imports.util -test.test_import.data.package -test.test_import.data.package.submodule -test.test_import.data.package2.submodule1 -test.test_import.data.package2.submodule2 -test.test_importlib -test.test_importlib.__main__ -test.test_importlib.abc -test.test_importlib.builtin -test.test_importlib.builtin.__main__ -test.test_importlib.builtin.test_finder -test.test_importlib.builtin.test_loader -test.test_importlib.data -test.test_importlib.data01 -test.test_importlib.data01.subdirectory -test.test_importlib.data02 -test.test_importlib.data02.one -test.test_importlib.data02.two -test.test_importlib.data03 -test.test_importlib.data03.namespace.portion1 -test.test_importlib.data03.namespace.portion2 -test.test_importlib.extension -test.test_importlib.extension.__main__ -test.test_importlib.extension.test_case_sensitivity -test.test_importlib.extension.test_finder -test.test_importlib.extension.test_loader -test.test_importlib.extension.test_path_hook -test.test_importlib.fixtures -test.test_importlib.frozen -test.test_importlib.frozen.__main__ -test.test_importlib.frozen.test_finder -test.test_importlib.frozen.test_loader -test.test_importlib.import_ -test.test_importlib.import_.__main__ -test.test_importlib.import_.test___loader__ -test.test_importlib.import_.test___package__ -test.test_importlib.import_.test_api -test.test_importlib.import_.test_caching -test.test_importlib.import_.test_fromlist -test.test_importlib.import_.test_meta_path -test.test_importlib.import_.test_packages -test.test_importlib.import_.test_path -test.test_importlib.import_.test_relative_imports -test.test_importlib.namespace_pkgs.both_portions.foo.one -test.test_importlib.namespace_pkgs.both_portions.foo.two -test.test_importlib.namespace_pkgs.module_and_namespace_package.a_test -test.test_importlib.namespace_pkgs.not_a_namespace_pkg.foo -test.test_importlib.namespace_pkgs.not_a_namespace_pkg.foo.one -test.test_importlib.namespace_pkgs.portion1.foo.one -test.test_importlib.namespace_pkgs.portion2.foo.two -test.test_importlib.namespace_pkgs.project1.parent.child.one -test.test_importlib.namespace_pkgs.project2.parent.child.two -test.test_importlib.namespace_pkgs.project3.parent.child.three -test.test_importlib.source -test.test_importlib.source.__main__ -test.test_importlib.source.test_case_sensitivity -test.test_importlib.source.test_file_loader -test.test_importlib.source.test_finder -test.test_importlib.source.test_path_hook -test.test_importlib.source.test_source_encoding -test.test_importlib.test_abc -test.test_importlib.test_api -test.test_importlib.test_lazy -test.test_importlib.test_locks -test.test_importlib.test_main -test.test_importlib.test_metadata_api -test.test_importlib.test_namespace_pkgs -test.test_importlib.test_open -test.test_importlib.test_path -test.test_importlib.test_read -test.test_importlib.test_resource -test.test_importlib.test_spec -test.test_importlib.test_util -test.test_importlib.test_windows -test.test_importlib.test_zip -test.test_importlib.util -test.test_importlib.zipdata01 -test.test_importlib.zipdata02 -test.test_index -test.test_inspect -test.test_int -test.test_int_literal -test.test_io -test.test_ioctl -test.test_ipaddress -test.test_isinstance -test.test_iter -test.test_iterlen -test.test_itertools -test.test_json -test.test_json.__main__ -test.test_json.test_decode -test.test_json.test_default -test.test_json.test_dump -test.test_json.test_encode_basestring_ascii -test.test_json.test_enum -test.test_json.test_fail -test.test_json.test_float -test.test_json.test_indent -test.test_json.test_pass1 -test.test_json.test_pass2 -test.test_json.test_pass3 -test.test_json.test_recursion -test.test_json.test_scanstring -test.test_json.test_separators -test.test_json.test_speedups -test.test_json.test_tool -test.test_json.test_unicode -test.test_keyword -test.test_keywordonlyarg -test.test_kqueue -test.test_largefile -test.test_lib2to3 -test.test_linecache -test.test_list -test.test_listcomps -test.test_lltrace -test.test_locale -test.test_logging -test.test_long -test.test_longexp -test.test_lzma -test.test_mailbox -test.test_mailcap -test.test_marshal -test.test_math -test.test_memoryio -test.test_memoryview -test.test_metaclass -test.test_mimetypes -test.test_minidom -test.test_mmap -test.test_module -test.test_modulefinder -test.test_msilib -test.test_multibytecodec -test.test_multiprocessing_fork -test.test_multiprocessing_forkserver -test.test_multiprocessing_main_handling -test.test_multiprocessing_spawn -test.test_named_expressions -test.test_netrc -test.test_nis -test.test_nntplib -test.test_normalization -test.test_ntpath -test.test_numeric_tower -test.test_opcodes -test.test_openpty -test.test_operator -test.test_optparse -test.test_ordered_dict -test.test_os -test.test_ossaudiodev -test.test_osx_env -test.test_parser -test.test_pathlib -test.test_pdb -test.test_peepholer -test.test_pickle -test.test_picklebuffer -test.test_pickletools -test.test_pipes -test.test_pkg -test.test_pkgimport -test.test_pkgutil -test.test_platform -test.test_plistlib -test.test_poll -test.test_popen -test.test_poplib -test.test_positional_only_arg -test.test_posix -test.test_posixpath -test.test_pow -test.test_pprint -test.test_print -test.test_profile -test.test_property -test.test_pstats -test.test_pty -test.test_pulldom -test.test_pwd -test.test_py_compile -test.test_pyclbr -test.test_pydoc -test.test_pyexpat -test.test_queue -test.test_quopri -test.test_raise -test.test_random -test.test_range -test.test_re -test.test_readline -test.test_regrtest -test.test_repl -test.test_reprlib -test.test_resource -test.test_richcmp -test.test_rlcompleter -test.test_robotparser -test.test_runpy -test.test_sax -test.test_sched -test.test_scope -test.test_script_helper -test.test_secrets -test.test_select -test.test_selectors -test.test_set -test.test_setcomps -test.test_shelve -test.test_shlex -test.test_shutil -test.test_signal -test.test_site -test.test_slice -test.test_smtpd -test.test_smtplib -test.test_smtpnet -test.test_sndhdr -test.test_socket -test.test_socketserver -test.test_sort -test.test_source_encoding -test.test_spwd -test.test_sqlite -test.test_ssl -test.test_startfile -test.test_stat -test.test_statistics -test.test_strftime -test.test_string -test.test_string_literals -test.test_stringprep -test.test_strptime -test.test_strtod -test.test_struct -test.test_structmembers -test.test_structseq -test.test_subclassinit -test.test_subprocess -test.test_sunau -test.test_sundry -test.test_super -test.test_support -test.test_symbol -test.test_symtable -test.test_syntax -test.test_sys -test.test_sys_setprofile -test.test_sys_settrace -test.test_sysconfig -test.test_syslog -test.test_tabnanny -test.test_tarfile -test.test_tcl -test.test_telnetlib -test.test_tempfile -test.test_textwrap -test.test_thread -test.test_threaded_import -test.test_threadedtempfile -test.test_threading -test.test_threading_local -test.test_threadsignals -test.test_time -test.test_timeit -test.test_timeout -test.test_tix -test.test_tk -test.test_tokenize -test.test_tools -test.test_tools.__main__ -test.test_tools.test_fixcid -test.test_tools.test_gprof2html -test.test_tools.test_i18n -test.test_tools.test_lll -test.test_tools.test_md5sum -test.test_tools.test_pathfix -test.test_tools.test_pdeps -test.test_tools.test_pindent -test.test_tools.test_reindent -test.test_tools.test_sundry -test.test_tools.test_unparse -test.test_trace -test.test_traceback -test.test_tracemalloc -test.test_ttk_guionly -test.test_ttk_textonly -test.test_tuple -test.test_turtle -test.test_type_comments -test.test_typechecks -test.test_types -test.test_typing -test.test_ucn -test.test_unary -test.test_unicode -test.test_unicode_file -test.test_unicode_file_functions -test.test_unicode_identifiers -test.test_unicodedata -test.test_unittest -test.test_univnewlines -test.test_unpack -test.test_unpack_ex -test.test_urllib -test.test_urllib2 -test.test_urllib2_localnet -test.test_urllib2net -test.test_urllib_response -test.test_urllibnet -test.test_urlparse -test.test_userdict -test.test_userlist -test.test_userstring -test.test_utf8_mode -test.test_utf8source -test.test_uu -test.test_uuid -test.test_venv -test.test_wait3 -test.test_wait4 -test.test_warnings -test.test_warnings.__main__ -test.test_warnings.data.import_warning -test.test_warnings.data.stacklevel -test.test_wave -test.test_weakref -test.test_weakset -test.test_webbrowser -test.test_winconsoleio -test.test_winreg -test.test_winsound -test.test_with -test.test_wsgiref -test.test_xdrlib -test.test_xml_dom_minicompat -test.test_xml_etree -test.test_xml_etree_c -test.test_xmlrpc -test.test_xmlrpc_net -test.test_xxtestfuzz -test.test_yield_from -test.test_zipapp -test.test_zipfile -test.test_zipfile64 -test.test_zipimport -test.test_zipimport_support -test.test_zlib -test.testcodec -test.tf_inherit_check -test.threaded_import_hangers -test.time_hashlib -test.tracedmodules -test.tracedmodules.testmod -test.win_console_handler -test.xmltests -test.ziptestdata.testdata_module_inside_zip -textwrap -this -threading -time -timeit -tkinter -tkinter.__main__ -tkinter.colorchooser -tkinter.commondialog -tkinter.constants -tkinter.dialog -tkinter.dnd -tkinter.filedialog -tkinter.font -tkinter.messagebox -tkinter.scrolledtext -tkinter.simpledialog -tkinter.test -tkinter.test.runtktests -tkinter.test.support -tkinter.test.test_tkinter -tkinter.test.test_tkinter.test_font -tkinter.test.test_tkinter.test_geometry_managers -tkinter.test.test_tkinter.test_images -tkinter.test.test_tkinter.test_loadtk -tkinter.test.test_tkinter.test_misc -tkinter.test.test_tkinter.test_text -tkinter.test.test_tkinter.test_variables -tkinter.test.test_tkinter.test_widgets -tkinter.test.test_ttk -tkinter.test.test_ttk.test_extensions -tkinter.test.test_ttk.test_functions -tkinter.test.test_ttk.test_style -tkinter.test.test_ttk.test_widgets -tkinter.test.widget_tests -tkinter.tix -tkinter.ttk -token -tokenize -trace -traceback -tracemalloc -tty -turtle -turtledemo -turtledemo.__main__ -turtledemo.bytedesign -turtledemo.chaos -turtledemo.clock -turtledemo.colormixer -turtledemo.forest -turtledemo.fractalcurves -turtledemo.lindenmayer -turtledemo.minimal_hanoi -turtledemo.nim -turtledemo.paint -turtledemo.peace -turtledemo.penrose -turtledemo.planet_and_moon -turtledemo.rosette -turtledemo.round_dance -turtledemo.sorting_animate -turtledemo.tree -turtledemo.two_canvases -turtledemo.yinyang -types -typing -typing.io -typing.re -unicodedata -unittest -unittest.__main__ -unittest.async_case -unittest.case -unittest.loader -unittest.main -unittest.mock -unittest.result -unittest.runner -unittest.signals -unittest.suite -unittest.test -unittest.test.__main__ -unittest.test._test_warnings -unittest.test.dummy -unittest.test.support -unittest.test.test_assertions -unittest.test.test_async_case -unittest.test.test_break -unittest.test.test_case -unittest.test.test_discovery -unittest.test.test_functiontestcase -unittest.test.test_loader -unittest.test.test_program -unittest.test.test_result -unittest.test.test_runner -unittest.test.test_setups -unittest.test.test_skipping -unittest.test.test_suite -unittest.test.testmock -unittest.test.testmock.__main__ -unittest.test.testmock.support -unittest.test.testmock.testasync -unittest.test.testmock.testcallable -unittest.test.testmock.testhelpers -unittest.test.testmock.testmagicmethods -unittest.test.testmock.testmock -unittest.test.testmock.testpatch -unittest.test.testmock.testsealable -unittest.test.testmock.testsentinel -unittest.test.testmock.testwith -unittest.util -urllib -urllib.error -urllib.parse -urllib.request -urllib.response -urllib.robotparser -uu -uuid -venv -venv.__main__ -warnings -wave -weakref -webbrowser -winreg -winsound -wsgiref -wsgiref.handlers -wsgiref.headers -wsgiref.simple_server -wsgiref.util -wsgiref.validate -xdrlib -xml -xml.dom -xml.dom.NodeFilter -xml.dom.domreg -xml.dom.expatbuilder -xml.dom.minicompat -xml.dom.minidom -xml.dom.pulldom -xml.dom.xmlbuilder -xml.etree -xml.etree.ElementInclude -xml.etree.ElementPath -xml.etree.ElementTree -xml.etree.cElementTree -xml.parsers -xml.parsers.expat -xml.parsers.expat.errors -xml.parsers.expat.model -xml.sax -xml.sax._exceptions -xml.sax.expatreader -xml.sax.handler -xml.sax.saxutils -xml.sax.xmlreader -xmlrpc -xmlrpc.client -xmlrpc.server -xxlimited -xxsubtype -zipapp -zipfile -zipimport -zlib \ No newline at end of file diff --git a/node_modules/arepl-backend/python/arepl_stdlib_list/stdlibTest.py b/node_modules/arepl-backend/python/arepl_stdlib_list/stdlibTest.py deleted file mode 100644 index 17815b3..0000000 --- a/node_modules/arepl-backend/python/arepl_stdlib_list/stdlibTest.py +++ /dev/null @@ -1,12 +0,0 @@ -import unittest -from . import stdlib_list - - -class TestStdlibList(unittest.TestCase): - def test_stdlib_list_returns_results(self): - returnInfo = stdlib_list() - assert len(returnInfo) != 0 - - -if __name__ == '__main__': - unittest.main() diff --git a/node_modules/arepl-backend/python/arepl_user_error.py b/node_modules/arepl-backend/python/arepl_user_error.py deleted file mode 100644 index af601fd..0000000 --- a/node_modules/arepl-backend/python/arepl_user_error.py +++ /dev/null @@ -1,31 +0,0 @@ -from arepl_pickler import pickle_user_vars -from traceback import TracebackException, FrameSummary -from types import TracebackType -from arepl_settings import get_settings - - -class UserError(Exception): - """ - user errors should be caught and re-thrown with this - Be warned that this exception can throw an exception. Yes, you read that right. I apologize in advance. - :raises: ValueError (varsSoFar gets pickled into JSON, which may result in any number of errors depending on what types are inside) - """ - - def __init__(self, exc_obj: BaseException, exc_tb: TracebackType, varsSoFar={}, execTime=0): - # skip arepl traceback - the user should just see their own error - exc_tb = exc_tb.tb_next - - self.traceback_exception = TracebackException(type(exc_obj), exc_obj, exc_tb) - self.friendly_message = "".join(self.traceback_exception.format()) - self.varsSoFar = pickle_user_vars( - varsSoFar, get_settings().default_filter_vars, get_settings().default_filter_types - ) - self.execTime = execTime - - # stack is empty in event of a syntax error - # This is problematic because frontend has to handle syntax/regular error differently - # to make it easier populate stack so frontend can handle them the same way - if self.traceback_exception.exc_type is SyntaxError: - self.traceback_exception.stack.append( - FrameSummary(self.traceback_exception.filename, int(self.traceback_exception.lineno), "") - ) diff --git a/node_modules/arepl-backend/python/astunparse/__init__.py b/node_modules/arepl-backend/python/astunparse/__init__.py deleted file mode 100644 index eb09077..0000000 --- a/node_modules/arepl-backend/python/astunparse/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding: utf-8 -from __future__ import absolute_import -from six.moves import cStringIO -from .unparser import Unparser -from .printer import Printer - - -__version__ = '1.6.3' - - -def unparse(tree): - v = cStringIO() - Unparser(tree, file=v) - return v.getvalue() - - -def dump(tree): - v = cStringIO() - Printer(file=v).visit(tree) - return v.getvalue() \ No newline at end of file diff --git a/node_modules/arepl-backend/python/astunparse/__main__.py b/node_modules/arepl-backend/python/astunparse/__main__.py deleted file mode 100644 index 64edc53..0000000 --- a/node_modules/arepl-backend/python/astunparse/__main__.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import print_function -import sys -import os -import argparse -from .unparser import roundtrip -from . import dump - - -def roundtrip_recursive(target, dump_tree=False): - if os.path.isfile(target): - print(target) - print("=" * len(target)) - if dump_tree: - dump(target) - else: - roundtrip(target) - print() - elif os.path.isdir(target): - for item in os.listdir(target): - if item.endswith(".py"): - roundtrip_recursive(os.path.join(target, item), dump_tree) - else: - print( - "WARNING: skipping '%s', not a file or directory" % target, - file=sys.stderr - ) - - -def main(args): - parser = argparse.ArgumentParser(prog="astunparse") - parser.add_argument( - 'target', - nargs='+', - help="Files or directories to show roundtripped source for" - ) - parser.add_argument( - '--dump', - type=bool, - help="Show a pretty-printed AST instead of the source" - ) - - arguments = parser.parse_args(args) - for target in arguments.target: - roundtrip_recursive(target, dump_tree=arguments.dump) - - -if __name__ == "__main__": - main(sys.argv[1:]) \ No newline at end of file diff --git a/node_modules/arepl-backend/python/astunparse/printer.py b/node_modules/arepl-backend/python/astunparse/printer.py deleted file mode 100644 index 1baa59a..0000000 --- a/node_modules/arepl-backend/python/astunparse/printer.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import unicode_literals -import sys -import ast -import six - - -class Printer(ast.NodeVisitor): - - def __init__(self, file=sys.stdout, indent=" "): - self.indentation = 0 - self.indent_with = indent - self.f = file - - # overridden to make the API obvious - def visit(self, node): - super(Printer, self).visit(node) - - def write(self, text): - self.f.write(six.text_type(text)) - - def generic_visit(self, node): - - if isinstance(node, list): - nodestart = "[" - nodeend = "]" - children = [("", child) for child in node] - else: - nodestart = type(node).__name__ + "(" - nodeend = ")" - children = [(name + "=", value) for name, value in ast.iter_fields(node)] - - if len(children) > 1: - self.indentation += 1 - - self.write(nodestart) - for i, pair in enumerate(children): - attr, child = pair - if len(children) > 1: - self.write("\n" + self.indent_with * self.indentation) - if isinstance(child, (ast.AST, list)): - self.write(attr) - self.visit(child) - else: - self.write(attr + repr(child)) - - if i != len(children) - 1: - self.write(",") - self.write(nodeend) - - if len(children) > 1: - self.indentation -= 1 \ No newline at end of file diff --git a/node_modules/arepl-backend/python/astunparse/unparser.py b/node_modules/arepl-backend/python/astunparse/unparser.py deleted file mode 100644 index 4a684c2..0000000 --- a/node_modules/arepl-backend/python/astunparse/unparser.py +++ /dev/null @@ -1,905 +0,0 @@ -from __future__ import print_function, unicode_literals -import six -import sys -import ast -import os -import tokenize -from six import StringIO - -# Large float and imaginary literals get turned into infinities in the AST. -# We unparse those infinities to INFSTR. -INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) - -def interleave(inter, f, seq): - """Call f on each item in seq, calling inter() in between. - """ - seq = iter(seq) - try: - f(next(seq)) - except StopIteration: - pass - else: - for x in seq: - inter() - f(x) - -class Unparser: - """Methods in this class recursively traverse an AST and - output source code for the abstract syntax; original formatting - is disregarded. """ - - def __init__(self, tree, file = sys.stdout): - """Unparser(tree, file=sys.stdout) -> None. - Print the source for tree to file.""" - self.f = file - self.future_imports = [] - self._indent = 0 - self.dispatch(tree) - print("", file=self.f) - self.f.flush() - - def fill(self, text = ""): - "Indent a piece of text, according to the current indentation level" - self.f.write("\n"+" "*self._indent + text) - - def write(self, text): - "Append a piece of text to the current line." - self.f.write(six.text_type(text)) - - def enter(self): - "Print ':', and increase the indentation." - self.write(":") - self._indent += 1 - - def leave(self): - "Decrease the indentation level." - self._indent -= 1 - - def dispatch(self, tree): - "Dispatcher function, dispatching tree type T to method _T." - if isinstance(tree, list): - for t in tree: - self.dispatch(t) - return - meth = getattr(self, "_"+tree.__class__.__name__) - meth(tree) - - - ############### Unparsing methods ###################### - # There should be one method per concrete grammar type # - # Constructors should be grouped by sum type. Ideally, # - # this would follow the order in the grammar, but # - # currently doesn't. # - ######################################################## - - def _Module(self, tree): - for stmt in tree.body: - self.dispatch(stmt) - - def _Interactive(self, tree): - for stmt in tree.body: - self.dispatch(stmt) - - def _Expression(self, tree): - self.dispatch(tree.body) - - # stmt - def _Expr(self, tree): - self.fill() - self.dispatch(tree.value) - - def _NamedExpr(self, tree): - self.write("(") - self.dispatch(tree.target) - self.write(" := ") - self.dispatch(tree.value) - self.write(")") - - def _Import(self, t): - self.fill("import ") - interleave(lambda: self.write(", "), self.dispatch, t.names) - - def _ImportFrom(self, t): - # A from __future__ import may affect unparsing, so record it. - if t.module and t.module == '__future__': - self.future_imports.extend(n.name for n in t.names) - - self.fill("from ") - self.write("." * t.level) - if t.module: - self.write(t.module) - self.write(" import ") - interleave(lambda: self.write(", "), self.dispatch, t.names) - - def _Assign(self, t): - self.fill() - for target in t.targets: - self.dispatch(target) - self.write(" = ") - self.dispatch(t.value) - - def _AugAssign(self, t): - self.fill() - self.dispatch(t.target) - self.write(" "+self.binop[t.op.__class__.__name__]+"= ") - self.dispatch(t.value) - - def _AnnAssign(self, t): - self.fill() - if not t.simple and isinstance(t.target, ast.Name): - self.write('(') - self.dispatch(t.target) - if not t.simple and isinstance(t.target, ast.Name): - self.write(')') - self.write(": ") - self.dispatch(t.annotation) - if t.value: - self.write(" = ") - self.dispatch(t.value) - - def _Return(self, t): - self.fill("return") - if t.value: - self.write(" ") - self.dispatch(t.value) - - def _Pass(self, t): - self.fill("pass") - - def _Break(self, t): - self.fill("break") - - def _Continue(self, t): - self.fill("continue") - - def _Delete(self, t): - self.fill("del ") - interleave(lambda: self.write(", "), self.dispatch, t.targets) - - def _Assert(self, t): - self.fill("assert ") - self.dispatch(t.test) - if t.msg: - self.write(", ") - self.dispatch(t.msg) - - def _Exec(self, t): - self.fill("exec ") - self.dispatch(t.body) - if t.globals: - self.write(" in ") - self.dispatch(t.globals) - if t.locals: - self.write(", ") - self.dispatch(t.locals) - - def _Print(self, t): - self.fill("print ") - do_comma = False - if t.dest: - self.write(">>") - self.dispatch(t.dest) - do_comma = True - for e in t.values: - if do_comma:self.write(", ") - else:do_comma=True - self.dispatch(e) - if not t.nl: - self.write(",") - - def _Global(self, t): - self.fill("global ") - interleave(lambda: self.write(", "), self.write, t.names) - - def _Nonlocal(self, t): - self.fill("nonlocal ") - interleave(lambda: self.write(", "), self.write, t.names) - - def _Await(self, t): - self.write("(") - self.write("await") - if t.value: - self.write(" ") - self.dispatch(t.value) - self.write(")") - - def _Yield(self, t): - self.write("(") - self.write("yield") - if t.value: - self.write(" ") - self.dispatch(t.value) - self.write(")") - - def _YieldFrom(self, t): - self.write("(") - self.write("yield from") - if t.value: - self.write(" ") - self.dispatch(t.value) - self.write(")") - - def _Raise(self, t): - self.fill("raise") - if six.PY3: - if not t.exc: - assert not t.cause - return - self.write(" ") - self.dispatch(t.exc) - if t.cause: - self.write(" from ") - self.dispatch(t.cause) - else: - self.write(" ") - if t.type: - self.dispatch(t.type) - if t.inst: - self.write(", ") - self.dispatch(t.inst) - if t.tback: - self.write(", ") - self.dispatch(t.tback) - - def _Try(self, t): - self.fill("try") - self.enter() - self.dispatch(t.body) - self.leave() - for ex in t.handlers: - self.dispatch(ex) - if t.orelse: - self.fill("else") - self.enter() - self.dispatch(t.orelse) - self.leave() - if t.finalbody: - self.fill("finally") - self.enter() - self.dispatch(t.finalbody) - self.leave() - - def _TryExcept(self, t): - self.fill("try") - self.enter() - self.dispatch(t.body) - self.leave() - - for ex in t.handlers: - self.dispatch(ex) - if t.orelse: - self.fill("else") - self.enter() - self.dispatch(t.orelse) - self.leave() - - def _TryFinally(self, t): - if len(t.body) == 1 and isinstance(t.body[0], ast.TryExcept): - # try-except-finally - self.dispatch(t.body) - else: - self.fill("try") - self.enter() - self.dispatch(t.body) - self.leave() - - self.fill("finally") - self.enter() - self.dispatch(t.finalbody) - self.leave() - - def _ExceptHandler(self, t): - self.fill("except") - if t.type: - self.write(" ") - self.dispatch(t.type) - if t.name: - self.write(" as ") - if six.PY3: - self.write(t.name) - else: - self.dispatch(t.name) - self.enter() - self.dispatch(t.body) - self.leave() - - def _ClassDef(self, t): - self.write("\n") - for deco in t.decorator_list: - self.fill("@") - self.dispatch(deco) - self.fill("class "+t.name) - if six.PY3: - self.write("(") - comma = False - for e in t.bases: - if comma: self.write(", ") - else: comma = True - self.dispatch(e) - for e in t.keywords: - if comma: self.write(", ") - else: comma = True - self.dispatch(e) - if sys.version_info[:2] < (3, 5): - if t.starargs: - if comma: self.write(", ") - else: comma = True - self.write("*") - self.dispatch(t.starargs) - if t.kwargs: - if comma: self.write(", ") - else: comma = True - self.write("**") - self.dispatch(t.kwargs) - self.write(")") - elif t.bases: - self.write("(") - for a in t.bases: - self.dispatch(a) - self.write(", ") - self.write(")") - self.enter() - self.dispatch(t.body) - self.leave() - - def _FunctionDef(self, t): - self.__FunctionDef_helper(t, "def") - - def _AsyncFunctionDef(self, t): - self.__FunctionDef_helper(t, "async def") - - def __FunctionDef_helper(self, t, fill_suffix): - self.write("\n") - for deco in t.decorator_list: - self.fill("@") - self.dispatch(deco) - def_str = fill_suffix+" "+t.name + "(" - self.fill(def_str) - self.dispatch(t.args) - self.write(")") - if getattr(t, "returns", False): - self.write(" -> ") - self.dispatch(t.returns) - self.enter() - self.dispatch(t.body) - self.leave() - - def _For(self, t): - self.__For_helper("for ", t) - - def _AsyncFor(self, t): - self.__For_helper("async for ", t) - - def __For_helper(self, fill, t): - self.fill(fill) - self.dispatch(t.target) - self.write(" in ") - self.dispatch(t.iter) - self.enter() - self.dispatch(t.body) - self.leave() - if t.orelse: - self.fill("else") - self.enter() - self.dispatch(t.orelse) - self.leave() - - def _If(self, t): - self.fill("if ") - self.dispatch(t.test) - self.enter() - self.dispatch(t.body) - self.leave() - # collapse nested ifs into equivalent elifs. - while (t.orelse and len(t.orelse) == 1 and - isinstance(t.orelse[0], ast.If)): - t = t.orelse[0] - self.fill("elif ") - self.dispatch(t.test) - self.enter() - self.dispatch(t.body) - self.leave() - # final else - if t.orelse: - self.fill("else") - self.enter() - self.dispatch(t.orelse) - self.leave() - - def _While(self, t): - self.fill("while ") - self.dispatch(t.test) - self.enter() - self.dispatch(t.body) - self.leave() - if t.orelse: - self.fill("else") - self.enter() - self.dispatch(t.orelse) - self.leave() - - def _generic_With(self, t, async_=False): - self.fill("async with " if async_ else "with ") - if hasattr(t, 'items'): - interleave(lambda: self.write(", "), self.dispatch, t.items) - else: - self.dispatch(t.context_expr) - if t.optional_vars: - self.write(" as ") - self.dispatch(t.optional_vars) - self.enter() - self.dispatch(t.body) - self.leave() - - def _With(self, t): - self._generic_With(t) - - def _AsyncWith(self, t): - self._generic_With(t, async_=True) - - # expr - def _Bytes(self, t): - self.write(repr(t.s)) - - def _Str(self, tree): - if six.PY3: - self.write(repr(tree.s)) - else: - # if from __future__ import unicode_literals is in effect, - # then we want to output string literals using a 'b' prefix - # and unicode literals with no prefix. - if "unicode_literals" not in self.future_imports: - self.write(repr(tree.s)) - elif isinstance(tree.s, str): - self.write("b" + repr(tree.s)) - elif isinstance(tree.s, unicode): - self.write(repr(tree.s).lstrip("u")) - else: - assert False, "shouldn't get here" - - def _JoinedStr(self, t): - # JoinedStr(expr* values) - self.write("f") - string = StringIO() - self._fstring_JoinedStr(t, string.write) - # Deviation from `unparse.py`: Try to find an unused quote. - # This change is made to handle _very_ complex f-strings. - v = string.getvalue() - if '\n' in v or '\r' in v: - quote_types = ["'''", '"""'] - else: - quote_types = ["'", '"', '"""', "'''"] - for quote_type in quote_types: - if quote_type not in v: - v = "{quote_type}{v}{quote_type}".format(quote_type=quote_type, v=v) - break - else: - v = repr(v) - self.write(v) - - def _FormattedValue(self, t): - # FormattedValue(expr value, int? conversion, expr? format_spec) - self.write("f") - string = StringIO() - self._fstring_JoinedStr(t, string.write) - self.write(repr(string.getvalue())) - - def _fstring_JoinedStr(self, t, write): - for value in t.values: - meth = getattr(self, "_fstring_" + type(value).__name__) - meth(value, write) - - def _fstring_Str(self, t, write): - value = t.s.replace("{", "{{").replace("}", "}}") - write(value) - - def _fstring_Constant(self, t, write): - assert isinstance(t.value, str) - value = t.value.replace("{", "{{").replace("}", "}}") - write(value) - - def _fstring_FormattedValue(self, t, write): - write("{") - expr = StringIO() - Unparser(t.value, expr) - expr = expr.getvalue().rstrip("\n") - if expr.startswith("{"): - write(" ") # Separate pair of opening brackets as "{ {" - write(expr) - if t.conversion != -1: - conversion = chr(t.conversion) - assert conversion in "sra" - write("!{conversion}".format(conversion=conversion)) - if t.format_spec: - write(":") - meth = getattr(self, "_fstring_" + type(t.format_spec).__name__) - meth(t.format_spec, write) - write("}") - - def _Name(self, t): - self.write(t.id) - - def _NameConstant(self, t): - self.write(repr(t.value)) - - def _Repr(self, t): - self.write("`") - self.dispatch(t.value) - self.write("`") - - def _write_constant(self, value): - if isinstance(value, (float, complex)): - # Substitute overflowing decimal literal for AST infinities. - self.write(repr(value).replace("inf", INFSTR)) - else: - self.write(repr(value)) - - def _Constant(self, t): - value = t.value - if isinstance(value, tuple): - self.write("(") - if len(value) == 1: - self._write_constant(value[0]) - self.write(",") - else: - interleave(lambda: self.write(", "), self._write_constant, value) - self.write(")") - elif value is Ellipsis: # instead of `...` for Py2 compatibility - self.write("...") - else: - if t.kind == "u": - self.write("u") - self._write_constant(t.value) - - def _Num(self, t): - repr_n = repr(t.n) - if six.PY3: - self.write(repr_n.replace("inf", INFSTR)) - else: - # Parenthesize negative numbers, to avoid turning (-1)**2 into -1**2. - if repr_n.startswith("-"): - self.write("(") - if "inf" in repr_n and repr_n.endswith("*j"): - repr_n = repr_n.replace("*j", "j") - # Substitute overflowing decimal literal for AST infinities. - self.write(repr_n.replace("inf", INFSTR)) - if repr_n.startswith("-"): - self.write(")") - - def _List(self, t): - self.write("[") - interleave(lambda: self.write(", "), self.dispatch, t.elts) - self.write("]") - - def _ListComp(self, t): - self.write("[") - self.dispatch(t.elt) - for gen in t.generators: - self.dispatch(gen) - self.write("]") - - def _GeneratorExp(self, t): - self.write("(") - self.dispatch(t.elt) - for gen in t.generators: - self.dispatch(gen) - self.write(")") - - def _SetComp(self, t): - self.write("{") - self.dispatch(t.elt) - for gen in t.generators: - self.dispatch(gen) - self.write("}") - - def _DictComp(self, t): - self.write("{") - self.dispatch(t.key) - self.write(": ") - self.dispatch(t.value) - for gen in t.generators: - self.dispatch(gen) - self.write("}") - - def _comprehension(self, t): - if getattr(t, 'is_async', False): - self.write(" async for ") - else: - self.write(" for ") - self.dispatch(t.target) - self.write(" in ") - self.dispatch(t.iter) - for if_clause in t.ifs: - self.write(" if ") - self.dispatch(if_clause) - - def _IfExp(self, t): - self.write("(") - self.dispatch(t.body) - self.write(" if ") - self.dispatch(t.test) - self.write(" else ") - self.dispatch(t.orelse) - self.write(")") - - def _Set(self, t): - assert(t.elts) # should be at least one element - self.write("{") - interleave(lambda: self.write(", "), self.dispatch, t.elts) - self.write("}") - - def _Dict(self, t): - self.write("{") - def write_key_value_pair(k, v): - self.dispatch(k) - self.write(": ") - self.dispatch(v) - - def write_item(item): - k, v = item - if k is None: - # for dictionary unpacking operator in dicts {**{'y': 2}} - # see PEP 448 for details - self.write("**") - self.dispatch(v) - else: - write_key_value_pair(k, v) - interleave(lambda: self.write(", "), write_item, zip(t.keys, t.values)) - self.write("}") - - def _Tuple(self, t): - self.write("(") - if len(t.elts) == 1: - elt = t.elts[0] - self.dispatch(elt) - self.write(",") - else: - interleave(lambda: self.write(", "), self.dispatch, t.elts) - self.write(")") - - unop = {"Invert":"~", "Not": "not", "UAdd":"+", "USub":"-"} - def _UnaryOp(self, t): - self.write("(") - self.write(self.unop[t.op.__class__.__name__]) - self.write(" ") - if six.PY2 and isinstance(t.op, ast.USub) and isinstance(t.operand, ast.Num): - # If we're applying unary minus to a number, parenthesize the number. - # This is necessary: -2147483648 is different from -(2147483648) on - # a 32-bit machine (the first is an int, the second a long), and - # -7j is different from -(7j). (The first has real part 0.0, the second - # has real part -0.0.) - self.write("(") - self.dispatch(t.operand) - self.write(")") - else: - self.dispatch(t.operand) - self.write(")") - - binop = { "Add":"+", "Sub":"-", "Mult":"*", "MatMult":"@", "Div":"/", "Mod":"%", - "LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", "BitAnd":"&", - "FloorDiv":"//", "Pow": "**"} - def _BinOp(self, t): - self.write("(") - self.dispatch(t.left) - self.write(" " + self.binop[t.op.__class__.__name__] + " ") - self.dispatch(t.right) - self.write(")") - - cmpops = {"Eq":"==", "NotEq":"!=", "Lt":"<", "LtE":"<=", "Gt":">", "GtE":">=", - "Is":"is", "IsNot":"is not", "In":"in", "NotIn":"not in"} - def _Compare(self, t): - self.write("(") - self.dispatch(t.left) - for o, e in zip(t.ops, t.comparators): - self.write(" " + self.cmpops[o.__class__.__name__] + " ") - self.dispatch(e) - self.write(")") - - boolops = {ast.And: 'and', ast.Or: 'or'} - def _BoolOp(self, t): - self.write("(") - s = " %s " % self.boolops[t.op.__class__] - interleave(lambda: self.write(s), self.dispatch, t.values) - self.write(")") - - def _Attribute(self,t): - self.dispatch(t.value) - # Special case: 3.__abs__() is a syntax error, so if t.value - # is an integer literal then we need to either parenthesize - # it or add an extra space to get 3 .__abs__(). - if isinstance(t.value, getattr(ast, 'Constant', getattr(ast, 'Num', None))) and isinstance(t.value.n, int): - self.write(" ") - self.write(".") - self.write(t.attr) - - def _Call(self, t): - self.dispatch(t.func) - self.write("(") - comma = False - for e in t.args: - if comma: self.write(", ") - else: comma = True - self.dispatch(e) - for e in t.keywords: - if comma: self.write(", ") - else: comma = True - self.dispatch(e) - if sys.version_info[:2] < (3, 5): - if t.starargs: - if comma: self.write(", ") - else: comma = True - self.write("*") - self.dispatch(t.starargs) - if t.kwargs: - if comma: self.write(", ") - else: comma = True - self.write("**") - self.dispatch(t.kwargs) - self.write(")") - - def _Subscript(self, t): - self.dispatch(t.value) - self.write("[") - self.dispatch(t.slice) - self.write("]") - - def _Starred(self, t): - self.write("*") - self.dispatch(t.value) - - # slice - def _Ellipsis(self, t): - self.write("...") - - def _Index(self, t): - self.dispatch(t.value) - - def _Slice(self, t): - if t.lower: - self.dispatch(t.lower) - self.write(":") - if t.upper: - self.dispatch(t.upper) - if t.step: - self.write(":") - self.dispatch(t.step) - - def _ExtSlice(self, t): - interleave(lambda: self.write(', '), self.dispatch, t.dims) - - # argument - def _arg(self, t): - self.write(t.arg) - if t.annotation: - self.write(": ") - self.dispatch(t.annotation) - - # others - def _arguments(self, t): - first = True - # normal arguments - all_args = getattr(t, 'posonlyargs', []) + t.args - defaults = [None] * (len(all_args) - len(t.defaults)) + t.defaults - for index, elements in enumerate(zip(all_args, defaults), 1): - a, d = elements - if first:first = False - else: self.write(", ") - self.dispatch(a) - if d: - self.write("=") - self.dispatch(d) - if index == len(getattr(t, 'posonlyargs', ())): - self.write(", /") - - # varargs, or bare '*' if no varargs but keyword-only arguments present - if t.vararg or getattr(t, "kwonlyargs", False): - if first:first = False - else: self.write(", ") - self.write("*") - if t.vararg: - if hasattr(t.vararg, 'arg'): - self.write(t.vararg.arg) - if t.vararg.annotation: - self.write(": ") - self.dispatch(t.vararg.annotation) - else: - self.write(t.vararg) - if getattr(t, 'varargannotation', None): - self.write(": ") - self.dispatch(t.varargannotation) - - # keyword-only arguments - if getattr(t, "kwonlyargs", False): - for a, d in zip(t.kwonlyargs, t.kw_defaults): - if first:first = False - else: self.write(", ") - self.dispatch(a), - if d: - self.write("=") - self.dispatch(d) - - # kwargs - if t.kwarg: - if first:first = False - else: self.write(", ") - if hasattr(t.kwarg, 'arg'): - self.write("**"+t.kwarg.arg) - if t.kwarg.annotation: - self.write(": ") - self.dispatch(t.kwarg.annotation) - else: - self.write("**"+t.kwarg) - if getattr(t, 'kwargannotation', None): - self.write(": ") - self.dispatch(t.kwargannotation) - - def _keyword(self, t): - if t.arg is None: - # starting from Python 3.5 this denotes a kwargs part of the invocation - self.write("**") - else: - self.write(t.arg) - self.write("=") - self.dispatch(t.value) - - def _Lambda(self, t): - self.write("(") - self.write("lambda ") - self.dispatch(t.args) - self.write(": ") - self.dispatch(t.body) - self.write(")") - - def _alias(self, t): - self.write(t.name) - if t.asname: - self.write(" as "+t.asname) - - def _withitem(self, t): - self.dispatch(t.context_expr) - if t.optional_vars: - self.write(" as ") - self.dispatch(t.optional_vars) - -def roundtrip(filename, output=sys.stdout): - if six.PY3: - with open(filename, "rb") as pyfile: - encoding = tokenize.detect_encoding(pyfile.readline)[0] - with open(filename, "r", encoding=encoding) as pyfile: - source = pyfile.read() - else: - with open(filename, "r") as pyfile: - source = pyfile.read() - tree = compile(source, filename, "exec", ast.PyCF_ONLY_AST, dont_inherit=True) - Unparser(tree, output) - - - -def testdir(a): - try: - names = [n for n in os.listdir(a) if n.endswith('.py')] - except OSError: - print("Directory not readable: %s" % a, file=sys.stderr) - else: - for n in names: - fullname = os.path.join(a, n) - if os.path.isfile(fullname): - output = StringIO() - print('Testing %s' % fullname) - try: - roundtrip(fullname, output) - except Exception as e: - print(' Failed to compile, exception is %s' % repr(e)) - elif os.path.isdir(fullname): - testdir(fullname) - -def main(args): - if args[0] == '--testdir': - for a in args[1:]: - testdir(a) - else: - for a in args: - roundtrip(a) - -if __name__=='__main__': - main(sys.argv[1:]) \ No newline at end of file diff --git a/node_modules/arepl-backend/python/blackify.bat b/node_modules/arepl-backend/python/blackify.bat deleted file mode 100644 index 7755e48..0000000 --- a/node_modules/arepl-backend/python/blackify.bat +++ /dev/null @@ -1 +0,0 @@ -black -l 120 . --exclude="/(testDataFiles|stdlib_list|jsonpickle)/" diff --git a/node_modules/arepl-backend/python/codegen.py b/node_modules/arepl-backend/python/codegen.py deleted file mode 100644 index 113d9be..0000000 --- a/node_modules/arepl-backend/python/codegen.py +++ /dev/null @@ -1,577 +0,0 @@ -""" - codegen - ~~~~~~~ - - Extension to ast that allow ast -> python code generation. - - :copyright: Copyright 2008 by Armin Ronacher. - :license: BSD. -""" -from ast import * - -BINOP_SYMBOLS = {} -BINOP_SYMBOLS[Add] = '+' -BINOP_SYMBOLS[Sub] = '-' -BINOP_SYMBOLS[Mult] = '*' -BINOP_SYMBOLS[Div] = '/' -BINOP_SYMBOLS[Mod] = '%' -BINOP_SYMBOLS[Pow] = '**' -BINOP_SYMBOLS[LShift] = '<<' -BINOP_SYMBOLS[RShift] = '>>' -BINOP_SYMBOLS[BitOr] = '|' -BINOP_SYMBOLS[BitXor] = '^' -BINOP_SYMBOLS[BitAnd] = '&' -BINOP_SYMBOLS[FloorDiv] = '//' - -BOOLOP_SYMBOLS = {} -BOOLOP_SYMBOLS[And] = 'and' -BOOLOP_SYMBOLS[Or] = 'or' - -CMPOP_SYMBOLS = {} -CMPOP_SYMBOLS[Eq] = '==' -CMPOP_SYMBOLS[NotEq] = '!=' -CMPOP_SYMBOLS[Lt] = '<' -CMPOP_SYMBOLS[LtE] = '<=' -CMPOP_SYMBOLS[Gt] = '>' -CMPOP_SYMBOLS[GtE] = '>=' -CMPOP_SYMBOLS[Is] = 'is' -CMPOP_SYMBOLS[IsNot] = 'is not' -CMPOP_SYMBOLS[In] = 'in' -CMPOP_SYMBOLS[NotIn] = 'not in' - -UNARYOP_SYMBOLS = {} -UNARYOP_SYMBOLS[Invert] = '~' -UNARYOP_SYMBOLS[Not] = 'not' -UNARYOP_SYMBOLS[UAdd] = '+' -UNARYOP_SYMBOLS[USub] = '-' - - -def to_source(node, indent_with=' ' * 4, add_line_information=False): - """This function can convert a node tree back into python sourcecode. - This is useful for debugging purposes, especially if you're dealing with - custom asts not generated by python itself. - - It could be that the sourcecode is evaluable when the AST itself is not - compilable / evaluable. The reason for this is that the AST contains some - more data than regular sourcecode does, which is dropped during - conversion. - - Each level of indentation is replaced with `indent_with`. Per default this - parameter is equal to four spaces as suggested by PEP 8, but it might be - adjusted to match the application's styleguide. - - If `add_line_information` is set to `True` comments for the line numbers - of the nodes are added to the output. This can be used to spot wrong line - number information of statement nodes. - """ - generator = SourceGenerator(indent_with, add_line_information) - generator.visit(node) - - return ''.join(generator.result) - -class SourceGenerator(NodeVisitor): - """This visitor is able to transform a well formed syntax tree into python - sourcecode. For more details have a look at the docstring of the - `node_to_source` function. - """ - - def __init__(self, indent_with, add_line_information=False): - self.result = [] - self.indent_with = indent_with - self.add_line_information = add_line_information - self.indentation = 0 - self.new_lines = 0 - - def write(self, x): - if self.new_lines: - if self.result: - self.result.append('\n' * self.new_lines) - self.result.append(self.indent_with * self.indentation) - self.new_lines = 0 - self.result.append(x) - - def newline(self, node=None, extra=0): - self.new_lines = max(self.new_lines, 1 + extra) - if node is not None and self.add_line_information: - self.write('# line: %s' % node.lineno) - self.new_lines = 1 - - def body(self, statements): - self.new_line = True - self.indentation += 1 - for stmt in statements: - self.visit(stmt) - self.indentation -= 1 - - def body_or_else(self, node): - self.body(node.body) - if node.orelse: - self.newline() - self.write('else:') - self.body(node.orelse) - - def signature(self, node): - want_comma = [] - def write_comma(): - if want_comma: - self.write(', ') - else: - want_comma.append(True) - - padding = [None] * (len(node.args) - len(node.defaults)) - for arg, default in zip(node.args, padding + node.defaults): - write_comma() - self.visit(arg) - if default is not None: - self.write('=') - self.visit(default) - if node.vararg is not None: - write_comma() - self.write('*' + node.vararg) - if node.kwarg is not None: - write_comma() - self.write('**' + node.kwarg) - - def decorators(self, node): - for decorator in node.decorator_list: - self.newline(decorator) - self.write('@') - self.visit(decorator) - - # Statements - - def visit_Assert(self, node): - self.newline(node) - self.write('assert ') - self.visit(node.test) - if node.msg is not None: - self.write(', ') - self.visit(node.msg) - - def visit_Assign(self, node): - self.newline(node) - for idx, target in enumerate(node.targets): - if idx: - self.write(', ') - self.visit(target) - self.write(' = ') - self.visit(node.value) - - def visit_AugAssign(self, node): - self.newline(node) - self.visit(node.target) - self.write(' ' + BINOP_SYMBOLS[type(node.op)] + '= ') - self.visit(node.value) - - def visit_ImportFrom(self, node): - self.newline(node) - self.write('from %s%s import ' % ('.' * node.level, node.module)) - for idx, item in enumerate(node.names): - if idx: - self.write(', ') - self.write(item) - - def visit_Import(self, node): - self.newline(node) - for item in node.names: - self.write('import ') - self.visit(item) - - def visit_Expr(self, node): - self.newline(node) - self.generic_visit(node) - - def visit_FunctionDef(self, node): - self.newline(extra=1) - self.decorators(node) - self.newline(node) - self.write('def %s(' % node.name) - self.visit(node.args) - self.write('):') - self.body(node.body) - - def visit_ClassDef(self, node): - have_args = [] - def paren_or_comma(): - if have_args: - self.write(', ') - else: - have_args.append(True) - self.write('(') - - self.newline(extra=2) - self.decorators(node) - self.newline(node) - self.write('class %s' % node.name) - for base in node.bases: - paren_or_comma() - self.visit(base) - # XXX: the if here is used to keep this module compatible - # with python 2.6. - if hasattr(node, 'keywords'): - for keyword in node.keywords: - paren_or_comma() - self.write(keyword.arg + '=') - self.visit(keyword.value) - if node.starargs is not None: - paren_or_comma() - self.write('*') - self.visit(node.starargs) - if node.kwargs is not None: - paren_or_comma() - self.write('**') - self.visit(node.kwargs) - self.write(have_args and '):' or ':') - self.body(node.body) - - def visit_If(self, node): - self.newline(node) - self.write('if ') - self.visit(node.test) - self.write(':') - self.body(node.body) - while True: - else_ = node.orelse - if len(else_) == 0: - break - elif len(else_) == 1 and isinstance(else_[0], If): - node = else_[0] - self.newline() - self.write('elif ') - self.visit(node.test) - self.write(':') - self.body(node.body) - else: - self.newline() - self.write('else:') - self.body(else_) - break - - def visit_For(self, node): - self.newline(node) - self.write('for ') - self.visit(node.target) - self.write(' in ') - self.visit(node.iter) - self.write(':') - self.body_or_else(node) - - def visit_While(self, node): - self.newline(node) - self.write('while ') - self.visit(node.test) - self.write(':') - self.body_or_else(node) - - def visit_With(self, node): - self.newline(node) - self.write('with ') - self.visit(node.context_expr) - if node.optional_vars is not None: - self.write(' as ') - self.visit(node.optional_vars) - self.write(':') - self.body(node.body) - - def visit_Pass(self, node): - self.newline(node) - self.write('pass') - - def visit_Print(self, node): - # XXX: python 2.6 only - self.newline(node) - self.write('print ') - want_comma = False - if node.dest is not None: - self.write(' >> ') - self.visit(node.dest) - want_comma = True - for value in node.values: - if want_comma: - self.write(', ') - self.visit(value) - want_comma = True - if not node.nl: - self.write(',') - - def visit_Delete(self, node): - self.newline(node) - self.write('del ') - for idx, target in enumerate(node): - if idx: - self.write(', ') - self.visit(target) - - def visit_TryExcept(self, node): - self.newline(node) - self.write('try:') - self.body(node.body) - for handler in node.handlers: - self.visit(handler) - - def visit_TryFinally(self, node): - self.newline(node) - self.write('try:') - self.body(node.body) - self.newline(node) - self.write('finally:') - self.body(node.finalbody) - - def visit_Global(self, node): - self.newline(node) - self.write('global ' + ', '.join(node.names)) - - def visit_Nonlocal(self, node): - self.newline(node) - self.write('nonlocal ' + ', '.join(node.names)) - - def visit_Return(self, node): - self.newline(node) - if node.value is None: - self.write('return') - else: - self.write('return ') - self.visit(node.value) - - def visit_Break(self, node): - self.newline(node) - self.write('break') - - def visit_Continue(self, node): - self.newline(node) - self.write('continue') - - def visit_Raise(self, node): - # XXX: Python 2.6 / 3.0 compatibility - self.newline(node) - self.write('raise') - if hasattr(node, 'exc') and node.exc is not None: - self.write(' ') - self.visit(node.exc) - if node.cause is not None: - self.write(' from ') - self.visit(node.cause) - elif hasattr(node, 'type') and node.type is not None: - self.visit(node.type) - if node.inst is not None: - self.write(', ') - self.visit(node.inst) - if node.tback is not None: - self.write(', ') - self.visit(node.tback) - - # Expressions - - def visit_Attribute(self, node): - self.visit(node.value) - self.write('.' + node.attr) - - def visit_Call(self, node): - want_comma = [] - def write_comma(): - if want_comma: - self.write(', ') - else: - want_comma.append(True) - - self.visit(node.func) - self.write('(') - for arg in node.args: - write_comma() - self.visit(arg) - for keyword in node.keywords: - write_comma() - self.write(keyword.arg + '=') - self.visit(keyword.value) - if node.starargs is not None: - write_comma() - self.write('*') - self.visit(node.starargs) - if node.kwargs is not None: - write_comma() - self.write('**') - self.visit(node.kwargs) - self.write(')') - - def visit_Name(self, node): - self.write(node.id) - - def visit_Str(self, node): - self.write(repr(node.s)) - - def visit_Bytes(self, node): - self.write(repr(node.s)) - - def visit_Num(self, node): - self.write(repr(node.n)) - - def visit_Tuple(self, node): - self.write('(') - idx = -1 - for idx, item in enumerate(node.elts): - if idx: - self.write(', ') - self.visit(item) - self.write(idx and ')' or ',)') - - def sequence_visit(left, right): - def visit(self, node): - self.write(left) - for idx, item in enumerate(node.elts): - if idx: - self.write(', ') - self.visit(item) - self.write(right) - return visit - - visit_List = sequence_visit('[', ']') - visit_Set = sequence_visit('{', '}') - del sequence_visit - - def visit_Dict(self, node): - self.write('{') - for idx, (key, value) in enumerate(zip(node.keys, node.values)): - if idx: - self.write(', ') - self.visit(key) - self.write(': ') - self.visit(value) - self.write('}') - - def visit_BinOp(self, node): - self.visit(node.left) - self.write(' %s ' % BINOP_SYMBOLS[type(node.op)]) - self.visit(node.right) - - def visit_BoolOp(self, node): - self.write('(') - for idx, value in enumerate(node.values): - if idx: - self.write(' %s ' % BOOLOP_SYMBOLS[type(node.op)]) - self.visit(value) - self.write(')') - - def visit_Compare(self, node): - self.write('(') - self.visit(node.left) - for op, right in zip(node.ops, node.comparators): - self.write(' %s ' % CMPOP_SYMBOLS[type(op)]) - self.visit(right) - self.write(')') - - def visit_UnaryOp(self, node): - self.write('(') - op = UNARYOP_SYMBOLS[type(node.op)] - self.write(op) - if op == 'not': - self.write(' ') - self.visit(node.operand) - self.write(')') - - def visit_Subscript(self, node): - self.visit(node.value) - self.write('[') - self.visit(node.slice) - self.write(']') - - def visit_Slice(self, node): - if node.lower is not None: - self.visit(node.lower) - self.write(':') - if node.upper is not None: - self.visit(node.upper) - if node.step is not None: - self.write(':') - if not (isinstance(node.step, Name) and node.step.id == 'None'): - self.visit(node.step) - - def visit_ExtSlice(self, node): - for idx, item in node.dims: - if idx: - self.write(', ') - self.visit(item) - - def visit_Yield(self, node): - self.write('yield ') - self.visit(node.value) - - def visit_Lambda(self, node): - self.write('lambda ') - self.visit(node.args) - self.write(': ') - self.visit(node.body) - - def visit_Ellipsis(self, node): - self.write('Ellipsis') - - def generator_visit(left, right): - def visit(self, node): - self.write(left) - self.visit(node.elt) - for comprehension in node.generators: - self.visit(comprehension) - self.write(right) - return visit - - visit_ListComp = generator_visit('[', ']') - visit_GeneratorExp = generator_visit('(', ')') - visit_SetComp = generator_visit('{', '}') - del generator_visit - - def visit_DictComp(self, node): - self.write('{') - self.visit(node.key) - self.write(': ') - self.visit(node.value) - for comprehension in node.generators: - self.visit(comprehension) - self.write('}') - - def visit_IfExp(self, node): - self.visit(node.body) - self.write(' if ') - self.visit(node.test) - self.write(' else ') - self.visit(node.orelse) - - def visit_Starred(self, node): - self.write('*') - self.visit(node.value) - - def visit_Repr(self, node): - # XXX: python 2.6 only - self.write('`') - self.visit(node.value) - self.write('`') - - # Helper Nodes - - def visit_alias(self, node): - self.write(node.name) - if node.asname is not None: - self.write(' as ' + node.asname) - - def visit_comprehension(self, node): - self.write(' for ') - self.visit(node.target) - self.write(' in ') - self.visit(node.iter) - if node.ifs: - for if_ in node.ifs: - self.write(' if ') - self.visit(if_) - - def visit_excepthandler(self, node): - self.newline(node) - self.write('except') - if node.type is not None: - self.write(' ') - self.visit(node.type) - if node.name is not None: - self.write(' as ') - self.visit(node.name) - self.write(':') - self.body(node.body) - - def visit_arguments(self, node): - self.signature(node) diff --git a/node_modules/arepl-backend/python/linter_req.txt b/node_modules/arepl-backend/python/linter_req.txt deleted file mode 100644 index fc3fb88..0000000 --- a/node_modules/arepl-backend/python/linter_req.txt +++ /dev/null @@ -1 +0,0 @@ -black==19.10b0 \ No newline at end of file diff --git a/node_modules/arepl-backend/python/requirements.txt b/node_modules/arepl-backend/python/requirements.txt deleted file mode 100644 index b7e34b9..0000000 --- a/node_modules/arepl-backend/python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest==3.8.2 -praw==4.3.0 # not needed for code, just for a test -p5==0.3.0a2 # not needed for code, just for a test \ No newline at end of file diff --git a/node_modules/arepl-backend/python/six.py b/node_modules/arepl-backend/python/six.py deleted file mode 100644 index 3eaae29..0000000 --- a/node_modules/arepl-backend/python/six.py +++ /dev/null @@ -1,982 +0,0 @@ -# Copyright (c) 2010-2020 Benjamin Peterson -# -# 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. - -"""Utilities for writing code that runs on Python 2 and 3""" - -from __future__ import absolute_import - -import functools -import itertools -import operator -import sys -import types - -__author__ = "Benjamin Peterson " -__version__ = "1.15.0" - - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 -PY34 = sys.version_info[0:2] >= (3, 4) - -if PY3: - string_types = str, - integer_types = int, - class_types = type, - text_type = str - binary_type = bytes - - MAXSIZE = sys.maxsize -else: - string_types = basestring, - integer_types = (int, long) - class_types = (type, types.ClassType) - text_type = unicode - binary_type = str - - if sys.platform.startswith("java"): - # Jython always uses 32 bits. - MAXSIZE = int((1 << 31) - 1) - else: - # It's possible to have sizeof(long) != sizeof(Py_ssize_t). - class X(object): - - def __len__(self): - return 1 << 31 - try: - len(X()) - except OverflowError: - # 32-bit - MAXSIZE = int((1 << 31) - 1) - else: - # 64-bit - MAXSIZE = int((1 << 63) - 1) - del X - - -def _add_doc(func, doc): - """Add documentation to a function.""" - func.__doc__ = doc - - -def _import_module(name): - """Import module, returning the module after the last dot.""" - __import__(name) - return sys.modules[name] - - -class _LazyDescr(object): - - def __init__(self, name): - self.name = name - - def __get__(self, obj, tp): - result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. - try: - # This is a bit ugly, but it avoids running this again by - # removing this descriptor. - delattr(obj.__class__, self.name) - except AttributeError: - pass - return result - - -class MovedModule(_LazyDescr): - - def __init__(self, name, old, new=None): - super(MovedModule, self).__init__(name) - if PY3: - if new is None: - new = name - self.mod = new - else: - self.mod = old - - def _resolve(self): - return _import_module(self.mod) - - def __getattr__(self, attr): - _module = self._resolve() - value = getattr(_module, attr) - setattr(self, attr, value) - return value - - -class _LazyModule(types.ModuleType): - - def __init__(self, name): - super(_LazyModule, self).__init__(name) - self.__doc__ = self.__class__.__doc__ - - def __dir__(self): - attrs = ["__doc__", "__name__"] - attrs += [attr.name for attr in self._moved_attributes] - return attrs - - # Subclasses should override this - _moved_attributes = [] - - -class MovedAttribute(_LazyDescr): - - def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): - super(MovedAttribute, self).__init__(name) - if PY3: - if new_mod is None: - new_mod = name - self.mod = new_mod - if new_attr is None: - if old_attr is None: - new_attr = name - else: - new_attr = old_attr - self.attr = new_attr - else: - self.mod = old_mod - if old_attr is None: - old_attr = name - self.attr = old_attr - - def _resolve(self): - module = _import_module(self.mod) - return getattr(module, self.attr) - - -class _SixMetaPathImporter(object): - - """ - A meta path importer to import six.moves and its submodules. - - This class implements a PEP302 finder and loader. It should be compatible - with Python 2.5 and all existing versions of Python3 - """ - - def __init__(self, six_module_name): - self.name = six_module_name - self.known_modules = {} - - def _add_module(self, mod, *fullnames): - for fullname in fullnames: - self.known_modules[self.name + "." + fullname] = mod - - def _get_module(self, fullname): - return self.known_modules[self.name + "." + fullname] - - def find_module(self, fullname, path=None): - if fullname in self.known_modules: - return self - return None - - def __get_module(self, fullname): - try: - return self.known_modules[fullname] - except KeyError: - raise ImportError("This loader does not know module " + fullname) - - def load_module(self, fullname): - try: - # in case of a reload - return sys.modules[fullname] - except KeyError: - pass - mod = self.__get_module(fullname) - if isinstance(mod, MovedModule): - mod = mod._resolve() - else: - mod.__loader__ = self - sys.modules[fullname] = mod - return mod - - def is_package(self, fullname): - """ - Return true, if the named module is a package. - - We need this method to get correct spec objects with - Python 3.4 (see PEP451) - """ - return hasattr(self.__get_module(fullname), "__path__") - - def get_code(self, fullname): - """Return None - - Required, if is_package is implemented""" - self.__get_module(fullname) # eventually raises ImportError - return None - get_source = get_code # same as get_code - -_importer = _SixMetaPathImporter(__name__) - - -class _MovedItems(_LazyModule): - - """Lazy loading of moved objects""" - __path__ = [] # mark as package - - -_moved_attributes = [ - MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), - MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), - MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), - MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), - MovedAttribute("intern", "__builtin__", "sys"), - MovedAttribute("map", "itertools", "builtins", "imap", "map"), - MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), - MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), - MovedAttribute("getoutput", "commands", "subprocess"), - MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), - MovedAttribute("reduce", "__builtin__", "functools"), - MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), - MovedAttribute("StringIO", "StringIO", "io"), - MovedAttribute("UserDict", "UserDict", "collections"), - MovedAttribute("UserList", "UserList", "collections"), - MovedAttribute("UserString", "UserString", "collections"), - MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), - MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), - MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"), - MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), - MovedModule("html_parser", "HTMLParser", "html.parser"), - MovedModule("http_client", "httplib", "http.client"), - MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), - MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"), - MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), - MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), - MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), - MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), - MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), - MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), - MovedModule("cPickle", "cPickle", "pickle"), - MovedModule("queue", "Queue"), - MovedModule("reprlib", "repr"), - MovedModule("socketserver", "SocketServer"), - MovedModule("_thread", "thread", "_thread"), - MovedModule("tkinter", "Tkinter"), - MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), - MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), - MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), - MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), - MovedModule("tkinter_tix", "Tix", "tkinter.tix"), - MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), - MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), - MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), - MovedModule("tkinter_colorchooser", "tkColorChooser", - "tkinter.colorchooser"), - MovedModule("tkinter_commondialog", "tkCommonDialog", - "tkinter.commondialog"), - MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), - MovedModule("tkinter_font", "tkFont", "tkinter.font"), - MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), - MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", - "tkinter.simpledialog"), - MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), - MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), - MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), - MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), - MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), -] -# Add windows specific modules. -if sys.platform == "win32": - _moved_attributes += [ - MovedModule("winreg", "_winreg"), - ] - -for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) - if isinstance(attr, MovedModule): - _importer._add_module(attr, "moves." + attr.name) -del attr - -_MovedItems._moved_attributes = _moved_attributes - -moves = _MovedItems(__name__ + ".moves") -_importer._add_module(moves, "moves") - - -class Module_six_moves_urllib_parse(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_parse""" - - -_urllib_parse_moved_attributes = [ - MovedAttribute("ParseResult", "urlparse", "urllib.parse"), - MovedAttribute("SplitResult", "urlparse", "urllib.parse"), - MovedAttribute("parse_qs", "urlparse", "urllib.parse"), - MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), - MovedAttribute("urldefrag", "urlparse", "urllib.parse"), - MovedAttribute("urljoin", "urlparse", "urllib.parse"), - MovedAttribute("urlparse", "urlparse", "urllib.parse"), - MovedAttribute("urlsplit", "urlparse", "urllib.parse"), - MovedAttribute("urlunparse", "urlparse", "urllib.parse"), - MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), - MovedAttribute("quote", "urllib", "urllib.parse"), - MovedAttribute("quote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote", "urllib", "urllib.parse"), - MovedAttribute("unquote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"), - MovedAttribute("urlencode", "urllib", "urllib.parse"), - MovedAttribute("splitquery", "urllib", "urllib.parse"), - MovedAttribute("splittag", "urllib", "urllib.parse"), - MovedAttribute("splituser", "urllib", "urllib.parse"), - MovedAttribute("splitvalue", "urllib", "urllib.parse"), - MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), - MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), - MovedAttribute("uses_params", "urlparse", "urllib.parse"), - MovedAttribute("uses_query", "urlparse", "urllib.parse"), - MovedAttribute("uses_relative", "urlparse", "urllib.parse"), -] -for attr in _urllib_parse_moved_attributes: - setattr(Module_six_moves_urllib_parse, attr.name, attr) -del attr - -Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes - -_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), - "moves.urllib_parse", "moves.urllib.parse") - - -class Module_six_moves_urllib_error(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_error""" - - -_urllib_error_moved_attributes = [ - MovedAttribute("URLError", "urllib2", "urllib.error"), - MovedAttribute("HTTPError", "urllib2", "urllib.error"), - MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), -] -for attr in _urllib_error_moved_attributes: - setattr(Module_six_moves_urllib_error, attr.name, attr) -del attr - -Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes - -_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), - "moves.urllib_error", "moves.urllib.error") - - -class Module_six_moves_urllib_request(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_request""" - - -_urllib_request_moved_attributes = [ - MovedAttribute("urlopen", "urllib2", "urllib.request"), - MovedAttribute("install_opener", "urllib2", "urllib.request"), - MovedAttribute("build_opener", "urllib2", "urllib.request"), - MovedAttribute("pathname2url", "urllib", "urllib.request"), - MovedAttribute("url2pathname", "urllib", "urllib.request"), - MovedAttribute("getproxies", "urllib", "urllib.request"), - MovedAttribute("Request", "urllib2", "urllib.request"), - MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), - MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), - MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), - MovedAttribute("BaseHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), - MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), - MovedAttribute("FileHandler", "urllib2", "urllib.request"), - MovedAttribute("FTPHandler", "urllib2", "urllib.request"), - MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), - MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), - MovedAttribute("urlretrieve", "urllib", "urllib.request"), - MovedAttribute("urlcleanup", "urllib", "urllib.request"), - MovedAttribute("URLopener", "urllib", "urllib.request"), - MovedAttribute("FancyURLopener", "urllib", "urllib.request"), - MovedAttribute("proxy_bypass", "urllib", "urllib.request"), - MovedAttribute("parse_http_list", "urllib2", "urllib.request"), - MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"), -] -for attr in _urllib_request_moved_attributes: - setattr(Module_six_moves_urllib_request, attr.name, attr) -del attr - -Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes - -_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), - "moves.urllib_request", "moves.urllib.request") - - -class Module_six_moves_urllib_response(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_response""" - - -_urllib_response_moved_attributes = [ - MovedAttribute("addbase", "urllib", "urllib.response"), - MovedAttribute("addclosehook", "urllib", "urllib.response"), - MovedAttribute("addinfo", "urllib", "urllib.response"), - MovedAttribute("addinfourl", "urllib", "urllib.response"), -] -for attr in _urllib_response_moved_attributes: - setattr(Module_six_moves_urllib_response, attr.name, attr) -del attr - -Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes - -_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), - "moves.urllib_response", "moves.urllib.response") - - -class Module_six_moves_urllib_robotparser(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_robotparser""" - - -_urllib_robotparser_moved_attributes = [ - MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), -] -for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -del attr - -Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes - -_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), - "moves.urllib_robotparser", "moves.urllib.robotparser") - - -class Module_six_moves_urllib(types.ModuleType): - - """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" - __path__ = [] # mark as package - parse = _importer._get_module("moves.urllib_parse") - error = _importer._get_module("moves.urllib_error") - request = _importer._get_module("moves.urllib_request") - response = _importer._get_module("moves.urllib_response") - robotparser = _importer._get_module("moves.urllib_robotparser") - - def __dir__(self): - return ['parse', 'error', 'request', 'response', 'robotparser'] - -_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), - "moves.urllib") - - -def add_move(move): - """Add an item to six.moves.""" - setattr(_MovedItems, move.name, move) - - -def remove_move(name): - """Remove item from six.moves.""" - try: - delattr(_MovedItems, name) - except AttributeError: - try: - del moves.__dict__[name] - except KeyError: - raise AttributeError("no such move, %r" % (name,)) - - -if PY3: - _meth_func = "__func__" - _meth_self = "__self__" - - _func_closure = "__closure__" - _func_code = "__code__" - _func_defaults = "__defaults__" - _func_globals = "__globals__" -else: - _meth_func = "im_func" - _meth_self = "im_self" - - _func_closure = "func_closure" - _func_code = "func_code" - _func_defaults = "func_defaults" - _func_globals = "func_globals" - - -try: - advance_iterator = next -except NameError: - def advance_iterator(it): - return it.next() -next = advance_iterator - - -try: - callable = callable -except NameError: - def callable(obj): - return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) - - -if PY3: - def get_unbound_function(unbound): - return unbound - - create_bound_method = types.MethodType - - def create_unbound_method(func, cls): - return func - - Iterator = object -else: - def get_unbound_function(unbound): - return unbound.im_func - - def create_bound_method(func, obj): - return types.MethodType(func, obj, obj.__class__) - - def create_unbound_method(func, cls): - return types.MethodType(func, None, cls) - - class Iterator(object): - - def next(self): - return type(self).__next__(self) - - callable = callable -_add_doc(get_unbound_function, - """Get the function out of a possibly unbound function""") - - -get_method_function = operator.attrgetter(_meth_func) -get_method_self = operator.attrgetter(_meth_self) -get_function_closure = operator.attrgetter(_func_closure) -get_function_code = operator.attrgetter(_func_code) -get_function_defaults = operator.attrgetter(_func_defaults) -get_function_globals = operator.attrgetter(_func_globals) - - -if PY3: - def iterkeys(d, **kw): - return iter(d.keys(**kw)) - - def itervalues(d, **kw): - return iter(d.values(**kw)) - - def iteritems(d, **kw): - return iter(d.items(**kw)) - - def iterlists(d, **kw): - return iter(d.lists(**kw)) - - viewkeys = operator.methodcaller("keys") - - viewvalues = operator.methodcaller("values") - - viewitems = operator.methodcaller("items") -else: - def iterkeys(d, **kw): - return d.iterkeys(**kw) - - def itervalues(d, **kw): - return d.itervalues(**kw) - - def iteritems(d, **kw): - return d.iteritems(**kw) - - def iterlists(d, **kw): - return d.iterlists(**kw) - - viewkeys = operator.methodcaller("viewkeys") - - viewvalues = operator.methodcaller("viewvalues") - - viewitems = operator.methodcaller("viewitems") - -_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") -_add_doc(itervalues, "Return an iterator over the values of a dictionary.") -_add_doc(iteritems, - "Return an iterator over the (key, value) pairs of a dictionary.") -_add_doc(iterlists, - "Return an iterator over the (key, [values]) pairs of a dictionary.") - - -if PY3: - def b(s): - return s.encode("latin-1") - - def u(s): - return s - unichr = chr - import struct - int2byte = struct.Struct(">B").pack - del struct - byte2int = operator.itemgetter(0) - indexbytes = operator.getitem - iterbytes = iter - import io - StringIO = io.StringIO - BytesIO = io.BytesIO - del io - _assertCountEqual = "assertCountEqual" - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" - _assertNotRegex = "assertNotRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" - _assertNotRegex = "assertNotRegex" -else: - def b(s): - return s - # Workaround for standalone backslash - - def u(s): - return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") - unichr = unichr - int2byte = chr - - def byte2int(bs): - return ord(bs[0]) - - def indexbytes(buf, i): - return ord(buf[i]) - iterbytes = functools.partial(itertools.imap, ord) - import StringIO - StringIO = BytesIO = StringIO.StringIO - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" - _assertNotRegex = "assertNotRegexpMatches" -_add_doc(b, """Byte literal""") -_add_doc(u, """Text literal""") - - -def assertCountEqual(self, *args, **kwargs): - return getattr(self, _assertCountEqual)(*args, **kwargs) - - -def assertRaisesRegex(self, *args, **kwargs): - return getattr(self, _assertRaisesRegex)(*args, **kwargs) - - -def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -def assertNotRegex(self, *args, **kwargs): - return getattr(self, _assertNotRegex)(*args, **kwargs) - - -if PY3: - exec_ = getattr(moves.builtins, "exec") - - def reraise(tp, value, tb=None): - try: - if value is None: - value = tp() - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - finally: - value = None - tb = None - -else: - def exec_(_code_, _globs_=None, _locs_=None): - """Execute code in a namespace.""" - if _globs_ is None: - frame = sys._getframe(1) - _globs_ = frame.f_globals - if _locs_ is None: - _locs_ = frame.f_locals - del frame - elif _locs_ is None: - _locs_ = _globs_ - exec("""exec _code_ in _globs_, _locs_""") - - exec_("""def reraise(tp, value, tb=None): - try: - raise tp, value, tb - finally: - tb = None -""") - - -if sys.version_info[:2] > (3,): - exec_("""def raise_from(value, from_value): - try: - raise value from from_value - finally: - value = None -""") -else: - def raise_from(value, from_value): - raise value - - -print_ = getattr(moves.builtins, "print", None) -if print_ is None: - def print_(*args, **kwargs): - """The new-style print function for Python 2.4 and 2.5.""" - fp = kwargs.pop("file", sys.stdout) - if fp is None: - return - - def write(data): - if not isinstance(data, basestring): - data = str(data) - # If the file has an encoding, encode unicode with it. - if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): - errors = getattr(fp, "errors", None) - if errors is None: - errors = "strict" - data = data.encode(fp.encoding, errors) - fp.write(data) - want_unicode = False - sep = kwargs.pop("sep", None) - if sep is not None: - if isinstance(sep, unicode): - want_unicode = True - elif not isinstance(sep, str): - raise TypeError("sep must be None or a string") - end = kwargs.pop("end", None) - if end is not None: - if isinstance(end, unicode): - want_unicode = True - elif not isinstance(end, str): - raise TypeError("end must be None or a string") - if kwargs: - raise TypeError("invalid keyword arguments to print()") - if not want_unicode: - for arg in args: - if isinstance(arg, unicode): - want_unicode = True - break - if want_unicode: - newline = unicode("\n") - space = unicode(" ") - else: - newline = "\n" - space = " " - if sep is None: - sep = space - if end is None: - end = newline - for i, arg in enumerate(args): - if i: - write(sep) - write(arg) - write(end) -if sys.version_info[:2] < (3, 3): - _print = print_ - - def print_(*args, **kwargs): - fp = kwargs.get("file", sys.stdout) - flush = kwargs.pop("flush", False) - _print(*args, **kwargs) - if flush and fp is not None: - fp.flush() - -_add_doc(reraise, """Reraise an exception.""") - -if sys.version_info[0:2] < (3, 4): - # This does exactly the same what the :func:`py3:functools.update_wrapper` - # function does on Python versions after 3.2. It sets the ``__wrapped__`` - # attribute on ``wrapper`` object and it doesn't raise an error if any of - # the attributes mentioned in ``assigned`` and ``updated`` are missing on - # ``wrapped`` object. - def _update_wrapper(wrapper, wrapped, - assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): - for attr in assigned: - try: - value = getattr(wrapped, attr) - except AttributeError: - continue - else: - setattr(wrapper, attr, value) - for attr in updated: - getattr(wrapper, attr).update(getattr(wrapped, attr, {})) - wrapper.__wrapped__ = wrapped - return wrapper - _update_wrapper.__doc__ = functools.update_wrapper.__doc__ - - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): - return functools.partial(_update_wrapper, wrapped=wrapped, - assigned=assigned, updated=updated) - wraps.__doc__ = functools.wraps.__doc__ - -else: - wraps = functools.wraps - - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(type): - - def __new__(cls, name, this_bases, d): - if sys.version_info[:2] >= (3, 7): - # This version introduced PEP 560 that requires a bit - # of extra care (we mimic what is done by __build_class__). - resolved_bases = types.resolve_bases(bases) - if resolved_bases is not bases: - d['__orig_bases__'] = bases - else: - resolved_bases = bases - return meta(name, resolved_bases, d) - - @classmethod - def __prepare__(cls, name, this_bases): - return meta.__prepare__(name, bases) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - if hasattr(cls, '__qualname__'): - orig_vars['__qualname__'] = cls.__qualname__ - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - - -def ensure_binary(s, encoding='utf-8', errors='strict'): - """Coerce **s** to six.binary_type. - - For Python 2: - - `unicode` -> encoded to `str` - - `str` -> `str` - - For Python 3: - - `str` -> encoded to `bytes` - - `bytes` -> `bytes` - """ - if isinstance(s, binary_type): - return s - if isinstance(s, text_type): - return s.encode(encoding, errors) - raise TypeError("not expecting type '%s'" % type(s)) - - -def ensure_str(s, encoding='utf-8', errors='strict'): - """Coerce *s* to `str`. - - For Python 2: - - `unicode` -> encoded to `str` - - `str` -> `str` - - For Python 3: - - `str` -> `str` - - `bytes` -> decoded to `str` - """ - # Optimization: Fast return for the common case. - if type(s) is str: - return s - if PY2 and isinstance(s, text_type): - return s.encode(encoding, errors) - elif PY3 and isinstance(s, binary_type): - return s.decode(encoding, errors) - elif not isinstance(s, (text_type, binary_type)): - raise TypeError("not expecting type '%s'" % type(s)) - return s - - -def ensure_text(s, encoding='utf-8', errors='strict'): - """Coerce *s* to six.text_type. - - For Python 2: - - `unicode` -> `unicode` - - `str` -> `unicode` - - For Python 3: - - `str` -> `str` - - `bytes` -> decoded to `str` - """ - if isinstance(s, binary_type): - return s.decode(encoding, errors) - elif isinstance(s, text_type): - return s - else: - raise TypeError("not expecting type '%s'" % type(s)) - - -def python_2_unicode_compatible(klass): - """ - A class decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method - returning text and apply this decorator to the class. - """ - if PY2: - if '__str__' not in klass.__dict__: - raise ValueError("@python_2_unicode_compatible cannot be applied " - "to %s because it doesn't define __str__()." % - klass.__name__) - klass.__unicode__ = klass.__str__ - klass.__str__ = lambda self: self.__unicode__().encode('utf-8') - return klass - - -# Complete the moves implementation. -# This code is at the end of this module to speed up module loading. -# Turn this module into a package. -__path__ = [] # required for PEP 302 and PEP 451 -__package__ = __name__ # see PEP 366 @ReservedAssignment -if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable -# Remove other six meta path importers, since they cause problems. This can -# happen if six is removed from sys.modules and then reloaded. (Setuptools does -# this for some reason.) -if sys.meta_path: - for i, importer in enumerate(sys.meta_path): - # Here's some real nastiness: Another "instance" of the six module might - # be floating around. Therefore, we can't use isinstance() to check for - # the six meta path importer, since the other six instance will have - # inserted an importer with different class. - if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): - del sys.meta_path[i] - break - del i, importer -# Finally, add the importer to the meta path import hook. -sys.meta_path.append(_importer) \ No newline at end of file diff --git a/node_modules/arepl-backend/python/testDataFiles/README.md b/node_modules/arepl-backend/python/testDataFiles/README.md deleted file mode 100644 index 925c61a..0000000 --- a/node_modules/arepl-backend/python/testDataFiles/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder contains test code that the unit tests run to check if arepl is working properly \ No newline at end of file diff --git a/node_modules/arepl-backend/python/testDataFiles/foo.py b/node_modules/arepl-backend/python/testDataFiles/foo.py deleted file mode 100644 index 3765dd8..0000000 --- a/node_modules/arepl-backend/python/testDataFiles/foo.py +++ /dev/null @@ -1,2 +0,0 @@ -def foo(): - return 2 diff --git a/node_modules/arepl-backend/python/testDataFiles/foo2.py b/node_modules/arepl-backend/python/testDataFiles/foo2.py deleted file mode 100644 index 6eca227..0000000 --- a/node_modules/arepl-backend/python/testDataFiles/foo2.py +++ /dev/null @@ -1,3 +0,0 @@ -# this file is for unit testing relative imports -from foo import foo -x=foo() \ No newline at end of file diff --git a/node_modules/arepl-backend/python/testDataFiles/importVar.py b/node_modules/arepl-backend/python/testDataFiles/importVar.py deleted file mode 100644 index 7024899..0000000 --- a/node_modules/arepl-backend/python/testDataFiles/importVar.py +++ /dev/null @@ -1,2 +0,0 @@ -from varToImport import varToImport -myVar = varToImport \ No newline at end of file diff --git a/node_modules/arepl-backend/python/testDataFiles/varToImport.py b/node_modules/arepl-backend/python/testDataFiles/varToImport.py deleted file mode 100644 index 75e0063..0000000 --- a/node_modules/arepl-backend/python/testDataFiles/varToImport.py +++ /dev/null @@ -1 +0,0 @@ -varToImport = 5 \ No newline at end of file diff --git a/node_modules/arepl-backend/python/test_arepl_dump.py b/node_modules/arepl-backend/python/test_arepl_dump.py deleted file mode 100644 index 07b73a6..0000000 --- a/node_modules/arepl-backend/python/test_arepl_dump.py +++ /dev/null @@ -1,54 +0,0 @@ -import pytest -from json import loads - -from arepl_dump import dump - -# this test has to be in main scope -# so we cant run it inside a function -output = dump(5) - - -def test_simple_dump(): - dumpInfo = dump("yo") - assert loads(dumpInfo.userVariables)["dump output"] == "yo" - assert dumpInfo.caller == "test_simple_dump" - assert dumpInfo.done == False - - -def test_dump_main_scope(): - global output - assert loads(output.userVariables)["dump output"] == 5 - assert output.caller == "" - - -def test_dump_all_vars(): - y = "hey" - dumpInfo = dump() - assert loads(dumpInfo.userVariables)["y"] == "hey" - - -def test_dump_at(): - for i in range(10): - output = dump("yo") - output2 = dump(i, 3) - if i is 0: - output = output - assert loads(output.userVariables)["dump output"] == "yo" - elif i is 3: - output2 = output2 - assert loads(output2.userVariables)["dump output"] == 3 - else: - assert output is None - - -def test_dump_at_list(): - for i in range(10): - output = dump(i, [2, 3]) - if i is 2: - output = output - assert loads(output.userVariables)["dump output"] == 2 - elif i is 3: - output = output - assert loads(output.userVariables)["dump output"] == 3 - else: - assert output is None diff --git a/node_modules/arepl-backend/python/test_handlers.py b/node_modules/arepl-backend/python/test_handlers.py deleted file mode 100644 index 77f3b5a..0000000 --- a/node_modules/arepl-backend/python/test_handlers.py +++ /dev/null @@ -1,39 +0,0 @@ -import arepl_jsonpickle as jsonpickle - -import arepl_python_evaluator as python_evaluator - - -def test_frame_handler(): - # I have a custom handler for frame (see https://github.com/Almenon/AREPL-backend/issues/26) - # otherwise frame returns as simply "py/object": "__builtin__.frame" - frame_code = """ -import bdb - -f = {} - -class areplDebug(bdb.Bdb): - # override - def user_line(self,frame): - global f - f = frame - -b = areplDebug() -b.run('x=1+5',{},{}) - """ - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(frame_code)) - vars = jsonpickle.decode(return_info.userVariables) - assert vars["f"]["f_lineno"] == 1 - - -def test_generator_handler(): - generator_code = """ -def count(start=0): - while True: - yield start - start += 1 - -counter = count() - """ - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(generator_code)) - vars = jsonpickle.decode(return_info.userVariables) - assert vars["counter"]["py/object"] == "builtins.generator" diff --git a/node_modules/arepl-backend/python/test_pickler.py b/node_modules/arepl-backend/python/test_pickler.py deleted file mode 100644 index a1165d3..0000000 --- a/node_modules/arepl-backend/python/test_pickler.py +++ /dev/null @@ -1,122 +0,0 @@ -from arepl_pickler import specialVars, pickle_user_vars, pickle_user_error -import arepl_python_evaluator as python_evaluator -import arepl_jsonpickle as jsonpickle - - -def test_special_floats(): - x = float("infinity") - y = float("nan") - z = float("-infinity") - vars = jsonpickle.decode(pickle_user_vars(locals())) - assert vars["x"] == "Infinity" - assert vars["y"] == "NaN" - assert vars["z"] == "-Infinity" - - -def test_default_type_filter(): - def foo(): - return 3 - - cat = 2 - vars = jsonpickle.decode(pickle_user_vars(locals())) - - assert vars["cat"] == 2 - assert "foo" not in vars - - -def test_custom_filter(): - arepl_filter = ["dog"] - dog = 1 - cat = 2 - vars = jsonpickle.decode(pickle_user_vars(locals())) - - assert vars["cat"] == 2 - assert "dog" not in vars - assert "arepl_filter" not in vars - - -def test_custom_type_filter(): - arepl_filter_type = [""] - dog = "" - cat = 2 - vars = jsonpickle.decode(pickle_user_vars(locals())) - - assert vars["cat"] == 2 - assert "dog" not in vars - assert "arepl_filter_type" not in vars - - -def test_custom_filter_function(): - def arepl_filter_function(userVariables): - userVariables["a"] = 3 - return userVariables - - vars = jsonpickle.decode(pickle_user_vars(locals())) - - assert vars["a"] == 3 - assert "arepl_filter_function" not in vars - - -def test_jsonpickle_err_doesnt_break_arepl(): - class foo: - def __getstate__(self): - a - - f = foo() - - assert jsonpickle.decode(pickle_user_vars(locals()))["f"] == "AREPL could not pickle this object" - - -# I don't want to require pandas to run tests -# So leaving this commented, devs can uncomment to run test if they want to -# def test_jsonpickle_err_doesnt_break_arepl_2(): -# import pandas as pd -# lets = ['A', 'B', 'C'] -# nums = ['1', '2', '3'] -# midx = pd.MultiIndex.from_product([lets, nums]) -# units = pd.Series(0, index=midx) - -# assert jsonpickle.decode(pickle_user_vars(locals()))["units"] == "AREPL could not pickle this object" - - -def test_error_has_extended_traceback_1(): - try: - python_evaluator.exec_input( - python_evaluator.ExecArgs( - """ -try: - x -except NameError as e: - x=1/0 -""" - ) - ) - except (KeyboardInterrupt, SystemExit): - raise - except python_evaluator.UserError as e: - json = pickle_user_error(e.traceback_exception) - assert "ZeroDivisionError" in json - assert "NameError" in json - - -def test_error_has_extended_traceback_2(): - try: - python_evaluator.exec_input( - python_evaluator.ExecArgs( - """ -def foo(): - raise ZeroDivisionError() - -try: - foo() -except Exception as e: - fah -""" - ) - ) - except (KeyboardInterrupt, SystemExit): - raise - except python_evaluator.UserError as e: - json = pickle_user_error(e.traceback_exception) - assert "NameError" in json - assert "ZeroDivisionError" in json diff --git a/node_modules/arepl-backend/python/test_python_evaluator.py b/node_modules/arepl-backend/python/test_python_evaluator.py deleted file mode 100644 index 3307bb8..0000000 --- a/node_modules/arepl-backend/python/test_python_evaluator.py +++ /dev/null @@ -1,440 +0,0 @@ -from os import chdir, getcwd, listdir, path, pardir, remove -from sys import version_info, modules -from shutil import rmtree -import tempfile - -import pytest -import arepl_jsonpickle as jsonpickle - -import arepl_python_evaluator as python_evaluator -from arepl_settings import update_settings - -python_ignore_path = path.join(path.dirname(path.abspath(__file__)), "testDataFiles") -# The frontend will pass in below settings as default -default_settings = { - "showGlobalVars": True, - "default_filter_vars": [], - "default_filter_types": ["", ""], -} - - -def setup_function(): - update_settings(default_settings) - - -def test_simple_code(): - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x = 1")) - assert jsonpickle.decode(return_info.userVariables)["x"] == 1 - - -def test_has_error(): - with pytest.raises(python_evaluator.UserError): - python_evaluator.exec_input(python_evaluator.ExecArgs("x")) - - -def test_error_has_traceback(): - try: - python_evaluator.exec_input( - python_evaluator.ExecArgs( - """ -def foo(): - x -foo() - """ - ) - ) - except (KeyboardInterrupt, SystemExit): - raise - except python_evaluator.UserError as e: - assert e.traceback_exception.exc_type == NameError - assert len(e.traceback_exception.stack) == 2 - assert e.traceback_exception.stack[0].lineno == 4 - assert e.traceback_exception.stack[1].lineno == 3 - assert "name 'x' is not defined" in e.friendly_message - - -def test_dict_unpack_error(): - with pytest.raises(python_evaluator.UserError): - python_evaluator.exec_input(python_evaluator.ExecArgs("[(k,v) for (k,v) in {'a': 1}]")) - - -def test_main_returns_var(): - mock_stdin = """{ - "savedCode": "", - "evalCode": "x=1", - "filePath": "", - "usePreviousVariables": false, - "showGlobalVars": true - }""" - return_info = python_evaluator.main(mock_stdin) - assert jsonpickle.decode(return_info.userVariables)["x"] == 1 - - -def test_main_returns_var_even_when_error(): - mock_stdin = """{ - "savedCode": "", - "evalCode": "y=1;x", - "filePath": "", - "usePreviousVariables": false, - "showGlobalVars": true - }""" - return_info = python_evaluator.main(mock_stdin) - assert jsonpickle.decode(return_info.userVariables)["y"] == 1 - - -def test_infinite_generator(): - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs( - """ -import itertools -counter = (x for x in itertools.count()) -x=next(counter) - """ - ) - ) - assert jsonpickle.decode(return_info.userVariables)["x"] == 0 - - -def test_dont_show_global_vars(): - update_settings({"showGlobalVars": False}) - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x = 1")) - assert jsonpickle.decode(return_info.userVariables)["zz status"] == "AREPL is configured to not show global vars" - - -def test_argv0_should_be_file_path(): - code = "from sys import argv;args=argv" - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(code)) - assert jsonpickle.decode(return_info.userVariables)["args"][0] == "" - - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(code, "", filePath="test path")) - assert jsonpickle.decode(return_info.userVariables)["args"][0] == "test path" - - -def test_syspath0_should_be_file_path(): - code = "from sys import path;first_path=path[0]" - temp_dir = tempfile.gettempdir() - fake_temp_file = path.join(temp_dir, "foo.py") - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(code, "", filePath=fake_temp_file)) - assert jsonpickle.decode(return_info.userVariables)["first_path"] == temp_dir - - -def test_starting_dunders_should_be_correct(): - code = "file_dunder=__file__" - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(code)) - assert jsonpickle.decode(return_info.userVariables)["file_dunder"] == "" - - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(code, "", filePath="test path")) - assert jsonpickle.decode(return_info.userVariables)["file_dunder"] == "test path" - - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("name_dunder=__name__")) - assert jsonpickle.decode(return_info.userVariables)["name_dunder"] == "__main__" - - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("loader_dunder=__loader__", filePath="test path")) - assert jsonpickle.decode(return_info.userVariables)["loader_dunder"].name == "__main__" - - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("loader_dunder=__loader__", filePath="test path")) - assert jsonpickle.decode(return_info.userVariables)["loader_dunder"].path == "test path" - - -def test_relative_import(): - file_path = path.join(python_ignore_path, "foo2.py") - with open(file_path) as f: - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(f.read(), "", file_path)) - assert jsonpickle.decode(return_info.userVariables)["x"] == 2 - - -def test_dump(): - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs("from arepl_dump import dump;dump('dump worked');x=1") - ) - assert jsonpickle.decode(return_info.userVariables)["x"] == 1 - - -def test_dump_when_exception(): - # this test prevents rather specific error case where i forget to uncache dump during exception handling - # and it causes dump to not work properly second time around (see https://github.com/Almenon/AREPL-vscode/issues/91) - try: - python_evaluator.exec_input( - python_evaluator.ExecArgs("from arepl_dump import dump;dumpOut = dump('dump worked');x=1;raise Exception()") - ) - except Exception as e: - assert "dumpOut" in jsonpickle.decode(e.varsSoFar) - try: - python_evaluator.exec_input( - python_evaluator.ExecArgs("from arepl_dump import dump;dumpOut = dump('dump worked');raise Exception()") - ) - except Exception as e: - assert "dumpOut" in jsonpickle.decode(e.varsSoFar) and jsonpickle.decode(e.varsSoFar)["dumpOut"] is not None - - -def test_import_does_not_show(): - # we only show local vars to user, no point in showing modules - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("import json")) - assert jsonpickle.decode(return_info.userVariables) == {} - - -def test_save(): - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs("", "from random import random\nx=random()#$save") - ) - randomVal = jsonpickle.decode(return_info.userVariables)["x"] - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs("z=3", "from random import random\nx=random()#$save") - ) - assert jsonpickle.decode(return_info.userVariables)["x"] == randomVal - - -def test_save_import(): # imports in saved section should be able to be referenced in exec section - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("z=math.sin(0)", "import math#$save")) - assert jsonpickle.decode(return_info.userVariables)["z"] == 0 - - -def test_various_types(): - various_types = """ -a = 1 -b = 1.1 -c = 'c' -d = (1,2) -def f(x): return x+1 -g = {} -h = [] -i = [[[]]] -class l(): - def __init__(self,x): - self.x = x -m = l(5) -n = False - - """ - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(various_types)) - - vars = jsonpickle.decode(return_info.userVariables) - assert vars["a"] == 1 - assert vars["b"] == 1.1 - assert vars["c"] == "c" - assert vars["d"] == (1, 2) - assert vars["g"] == {} - assert vars["h"] == [] - assert vars["i"] == [[[]]] - assert vars["l"] != None - assert vars["m"] != None - assert vars["n"] == False - - -def test_file_IO(): - file_IO = """ -import tempfile - -fp = tempfile.TemporaryFile() -fp.write(b'yo') -fp.seek(0) -x = fp.read() -fp.close() - """ - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(file_IO)) - vars = jsonpickle.decode(return_info.userVariables) - assert "fp" in vars - assert vars["x"] == b"yo" - - -def test_event_Loop(): - event_loop_code = """ -import asyncio - -async def async_run(): - pass - -def compile_async_tasks(): - tasks = [] - - tasks.append( - asyncio.ensure_future(async_run()) - ) - return tasks - -tasks = compile_async_tasks() - -loop = asyncio.get_event_loop() -loop.run_until_complete(asyncio.gather(*tasks)) -loop.close() -x=1 - """ - - # the async def async_run would result - # in syntax error in python versions < 3.5 - # so we use different test in that case - if version_info < (3, 5): - event_loop_code = """ -import asyncio - -@asyncio.coroutine -def hello_world(): - print("Hello World!") - -loop = asyncio.get_event_loop() -# Blocking call which returns when the hello_world() coroutine is done -loop.run_until_complete(hello_world()) -loop.close() -x=1 - """ - - python_evaluator.exec_input(python_evaluator.ExecArgs(event_loop_code)) - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(event_loop_code)) - vars = jsonpickle.decode(return_info.userVariables) - assert "x" in vars - - -def test_builtinImportNotDeleted(): - importStr = """ -import math -from json import loads - """ - python_evaluator.exec_input(python_evaluator.ExecArgs(importStr)) - assert "math" in modules - assert "json" in modules - - -def test_pipImportNotDeleted(): - importStr = """ -import praw - """ - python_evaluator.exec_input(python_evaluator.ExecArgs(importStr)) - assert "praw" in modules - assert "praw.models.user" in modules - - -def test_user_import_deleted(): - - file_path = path.join(python_ignore_path, "foo.py") - file_path2 = path.join(python_ignore_path, "foo2.py") - - with open(file_path) as f: - origFileText = f.read() - - try: - with open(file_path2) as f: - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(f.read(), "", file_path2)) - assert jsonpickle.decode(return_info.userVariables)["x"] == 2 # just checking this for later on - assert "foo" not in modules # user import should be deleted! - - # now that import is uncached i should be able to change code, rerun & get different result - with open(file_path, "w") as f: - f.write("def foo():\n return 3") - - with open(file_path2) as f: - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(f.read(), "", file_path2)) - assert jsonpickle.decode(return_info.userVariables)["x"] == 3 - - finally: - # restore file back to original - with open(file_path, "w") as f: - f.write(origFileText) - - -def test_user_var_import_deleted(): - - # __pycache__ will muck up our test on every second run - # this problem only happens during unit tests and not in actual useage (not sure why) - # so we can safely delete pycache to avoid the problem - rmtree(path.join(python_ignore_path, "__pycache__")) - - varToImportFile_path = path.join(python_ignore_path, "varToImport.py") - importVarFile_path = path.join(python_ignore_path, "importVar.py") - - with open(varToImportFile_path) as f: - origVarToImportFileText = f.read() - - try: - with open(importVarFile_path) as f: - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(f.read(), "", importVarFile_path)) - assert jsonpickle.decode(return_info.userVariables)["myVar"] == 5 # just checking this for later on - assert "varToImport" not in modules # user import should be deleted! - - # now that import is uncached i should be able to change code, rerun & get different result - with open(varToImportFile_path, "w") as f: - f.write("varToImport = 3") - - with open(importVarFile_path) as f: - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs(f.read(), "", importVarFile_path)) - assert jsonpickle.decode(return_info.userVariables)["myVar"] == 3 - - finally: - # restore file back to original - with open(varToImportFile_path, "w") as f: - f.write(origVarToImportFileText) - - -def test_arepl_store(): - python_evaluator.exec_input(python_evaluator.ExecArgs("arepl_store=5")) - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x=arepl_store")) - assert jsonpickle.decode(return_info.userVariables)["x"] == 5 - - -def test_howdoiArepl(): - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x=howdoi('use arepl')")) - assert ( - jsonpickle.decode(return_info.userVariables)["x"] - == "using AREPL is simple - just start coding and arepl will show you the final state of your variables. For more help see https://github.com/Almenon/AREPL-vscode/wiki" - ) - - -def test_script_path_should_work_regardless_of_user_errors(): - try: - python_evaluator.exec_input(python_evaluator.ExecArgs("from sys import path;x", filePath=python_ignore_path)) - except python_evaluator.UserError as e: - return_info = e.varsSoFar - try: - python_evaluator.exec_input(python_evaluator.ExecArgs("from sys import path;x", filePath=python_ignore_path)) - except python_evaluator.UserError as e: - secondreturn_info = e.varsSoFar - - # script_path should restore the sys path back to original state after execution - # so each run should have same path - assert jsonpickle.decode(return_info)["path"] == jsonpickle.decode(secondreturn_info)["path"] - - -def test_mock_stdin(): - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs("standard_input = 'hello\\nworld';x=input();y=input()") - ) - assert jsonpickle.decode(return_info.userVariables)["x"] == "hello" - assert jsonpickle.decode(return_info.userVariables)["y"] == "world" - - return_info = python_evaluator.exec_input( - python_evaluator.ExecArgs("standard_input = ['hello', 'world'];x=input();y=input()") - ) - assert jsonpickle.decode(return_info.userVariables)["x"] == "hello" - assert jsonpickle.decode(return_info.userVariables)["y"] == "world" - - with pytest.raises(python_evaluator.UserError): - python_evaluator.exec_input(python_evaluator.ExecArgs("standard_input = ['hello'];x=input();y=input()")) - - -def integration_test_howdoi(): - # this requires internet access so it is not official test - return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x=howdoi('eat a apple')")) - print(jsonpickle.decode(return_info.userVariables)["x"]) # this should print out howdoi results - - -########################### -# WIERD STUFF -########################### - -# lambdas do not show up at all - -# file objects show up as None - -# class pickling does work with #$save - but not when unit testing for some reason -# "Can't pickle : it's not found as python_evaluator.l" -# not sure why it's trying to find the class in python_evaluator - it's not going to be there -# todo: investigate issue - -# def test_can_pickle_class(self): -# code = """ -# class l(): -# def __init__(self,x): -# self.x = x #$save""" -# return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("",code)) -# randomVal = jsonpickle.decode(return_info['userVariables'])['l'] -# return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("z=3",code)) -# randomVal = jsonpickle.decode(return_info['userVariables'])['l'] diff --git a/node_modules/arg/LICENSE.md b/node_modules/arg/LICENSE.md deleted file mode 100644 index 4cc2d3c..0000000 --- a/node_modules/arg/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-2019 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/arg/README.md b/node_modules/arg/README.md deleted file mode 100644 index 9a02706..0000000 --- a/node_modules/arg/README.md +++ /dev/null @@ -1,280 +0,0 @@ -# Arg [![CircleCI](https://circleci.com/gh/zeit/arg.svg?style=svg)](https://circleci.com/gh/zeit/arg) - -`arg` is yet another command line option parser. - -## Installation - -Use Yarn or NPM to install. - -```console -$ yarn add arg -``` - -or - -```console -$ npm install arg -``` - -## Usage - -`arg()` takes either 1 or 2 arguments: - -1. Command line specification object (see below) -2. Parse options (_Optional_, defaults to `{permissive: false, argv: process.argv.slice(2), stopAtPositional: false}`) - -It returns an object with any values present on the command-line (missing options are thus -missing from the resulting object). Arg performs no validation/requirement checking - we -leave that up to the application. - -All parameters that aren't consumed by options (commonly referred to as "extra" parameters) -are added to `result._`, which is _always_ an array (even if no extra parameters are passed, -in which case an empty array is returned). - -```javascript -const arg = require('arg'); - -// `options` is an optional parameter -const args = arg(spec, options = {permissive: false, argv: process.argv.slice(2)}); -``` - -For example: - -```console -$ node ./hello.js --verbose -vvv --port=1234 -n 'My name' foo bar --tag qux --tag=qix -- --foobar -``` - -```javascript -// hello.js -const arg = require('arg'); - -const args = arg({ - // Types - '--help': Boolean, - '--version': Boolean, - '--verbose': arg.COUNT, // Counts the number of times --verbose is passed - '--port': Number, // --port or --port= - '--name': String, // --name or --name= - '--tag': [String], // --tag or --tag= - - // Aliases - '-v': '--verbose', - '-n': '--name', // -n ; result is stored in --name - '--label': '--name' // --label or --label=; - // result is stored in --name -}); - -console.log(args); -/* -{ - _: ["foo", "bar", "--foobar"], - '--port': 1234, - '--verbose': 4, - '--name': "My name", - '--tag': ["qux", "qix"] -} -*/ -``` - -The values for each key=>value pair is either a type (function or [function]) or a string (indicating an alias). - -- In the case of a function, the string value of the argument's value is passed to it, - and the return value is used as the ultimate value. - -- In the case of an array, the only element _must_ be a type function. Array types indicate - that the argument may be passed multiple times, and as such the resulting value in the returned - object is an array with all of the values that were passed using the specified flag. - -- In the case of a string, an alias is established. If a flag is passed that matches the _key_, - then the _value_ is substituted in its place. - -Type functions are passed three arguments: - -1. The parameter value (always a string) -2. The parameter name (e.g. `--label`) -3. The previous value for the destination (useful for reduce-like operations or for supporting `-v` multiple times, etc.) - -This means the built-in `String`, `Number`, and `Boolean` type constructors "just work" as type functions. - -Note that `Boolean` and `[Boolean]` have special treatment - an option argument is _not_ consumed or passed, but instead `true` is -returned. These options are called "flags". - -For custom handlers that wish to behave as flags, you may pass the function through `arg.flag()`: - -```javascript -const arg = require('arg'); - -const argv = ['--foo', 'bar', '-ff', 'baz', '--foo', '--foo', 'qux', '-fff', 'qix']; - -function myHandler(value, argName, previousValue) { - /* `value` is always `true` */ - return 'na ' + (previousValue || 'batman!'); -} - -const args = arg({ - '--foo': arg.flag(myHandler), - '-f': '--foo' -}, { - argv -}); - -console.log(args); -/* -{ - _: ['bar', 'baz', 'qux', 'qix'], - '--foo': 'na na na na na na na na batman!' -} -*/ -``` - -As well, `arg` supplies a helper argument handler called `arg.COUNT`, which equivalent to a `[Boolean]` argument's `.length` -property - effectively counting the number of times the boolean flag, denoted by the key, is passed on the command line.. -For example, this is how you could implement `ssh`'s multiple levels of verbosity (`-vvvv` being the most verbose). - -```javascript -const arg = require('arg'); - -const argv = ['-AAAA', '-BBBB']; - -const args = arg({ - '-A': arg.COUNT, - '-B': [Boolean] -}, { - argv -}); - -console.log(args); -/* -{ - _: [], - '-A': 4, - '-B': [true, true, true, true] -} -*/ -``` - -### Options - -If a second parameter is specified and is an object, it specifies parsing options to modify the behavior of `arg()`. - -#### `argv` - -If you have already sliced or generated a number of raw arguments to be parsed (as opposed to letting `arg` -slice them from `process.argv`) you may specify them in the `argv` option. - -For example: - -```javascript -const args = arg( - { - '--foo': String - }, { - argv: ['hello', '--foo', 'world'] - } -); -``` - -results in: - -```javascript -const args = { - _: ['hello'], - '--foo': 'world' -}; -``` - -#### `permissive` - -When `permissive` set to `true`, `arg` will push any unknown arguments -onto the "extra" argument array (`result._`) instead of throwing an error about -an unknown flag. - -For example: - -```javascript -const arg = require('arg'); - -const argv = ['--foo', 'hello', '--qux', 'qix', '--bar', '12345', 'hello again']; - -const args = arg( - { - '--foo': String, - '--bar': Number - }, { - argv, - permissive: true - } -); -``` - -results in: - -```javascript -const args = { - _: ['--qux', 'qix', 'hello again'], - '--foo': 'hello', - '--bar': 12345 -} -``` - -#### `stopAtPositional` - -When `stopAtPositional` is set to `true`, `arg` will halt parsing at the first -positional argument. - -For example: - -```javascript -const arg = require('arg'); - -const argv = ['--foo', 'hello', '--bar']; - -const args = arg( - { - '--foo': Boolean, - '--bar': Boolean - }, { - argv, - stopAtPositional: true - } -); -``` - -results in: - -```javascript -const args = { - _: ['hello', '--bar'], - '--foo': true -}; -``` - -### Errors - -Some errors that `arg` throws provide a `.code` property in order to aid in recovering from user error, or to -differentiate between user error and developer error (bug). - -##### ARG_UNKNOWN_OPTION - -If an unknown option (not defined in the spec object) is passed, an error with code `ARG_UNKNOWN_OPTION` will be thrown: -```js -// cli.js -try { - require('arg')({ '--hi': String }); -} catch (err) { - if (err.code === 'ARG_UNKNOWN_OPTION') { - console.log(err.message); - } else { - throw err; - } -} -``` - -```shell -node cli.js --extraneous true -Unknown or unexpected option: --extraneous -``` - -# License - -Copyright © 2017-2019 by ZEIT, Inc. Released under the [MIT License](LICENSE.md). diff --git a/node_modules/arg/index.d.ts b/node_modules/arg/index.d.ts deleted file mode 100644 index 5752aa8..0000000 --- a/node_modules/arg/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare const flagSymbol: unique symbol; - -declare function arg(spec: T, options?: arg.Options): arg.Result; - -declare namespace arg { - export function flag(fn: T): T & { [flagSymbol]: true }; - - export const COUNT: Handler & { [flagSymbol]: true }; - - export type Handler = (value: string, name: string, previousValue?: T) => T; - - export interface Spec { - [key: string]: string | Handler | [Handler]; - } - - export type Result = { _: string[] } & { - [K in keyof T]?: T[K] extends Handler - ? ReturnType - : T[K] extends [Handler] - ? Array> - : never - }; - - export interface Options { - argv?: string[]; - permissive?: boolean; - stopAtPositional?: boolean; - } -} - -export = arg; diff --git a/node_modules/arg/index.js b/node_modules/arg/index.js deleted file mode 100644 index 7d794f8..0000000 --- a/node_modules/arg/index.js +++ /dev/null @@ -1,144 +0,0 @@ -const flagSymbol = Symbol('arg flag'); - -function arg(opts, {argv = process.argv.slice(2), permissive = false, stopAtPositional = false} = {}) { - if (!opts) { - throw new Error('Argument specification object is required'); - } - - const result = {_: []}; - - const aliases = {}; - const handlers = {}; - - for (const key of Object.keys(opts)) { - if (!key) { - throw new TypeError('Argument key cannot be an empty string'); - } - - if (key[0] !== '-') { - throw new TypeError(`Argument key must start with '-' but found: '${key}'`); - } - - if (key.length === 1) { - throw new TypeError(`Argument key must have a name; singular '-' keys are not allowed: ${key}`); - } - - if (typeof opts[key] === 'string') { - aliases[key] = opts[key]; - continue; - } - - let type = opts[key]; - let isFlag = false; - - if (Array.isArray(type) && type.length === 1 && typeof type[0] === 'function') { - const [fn] = type; - type = (value, name, prev = []) => { - prev.push(fn(value, name, prev[prev.length - 1])); - return prev; - }; - isFlag = fn === Boolean || fn[flagSymbol] === true; - } else if (typeof type === 'function') { - isFlag = type === Boolean || type[flagSymbol] === true; - } else { - throw new TypeError(`Type missing or not a function or valid array type: ${key}`); - } - - if (key[1] !== '-' && key.length > 2) { - throw new TypeError(`Short argument keys (with a single hyphen) must have only one character: ${key}`); - } - - handlers[key] = [type, isFlag]; - } - - for (let i = 0, len = argv.length; i < len; i++) { - const wholeArg = argv[i]; - - if (stopAtPositional && result._.length > 0) { - result._ = result._.concat(argv.slice(i)); - break; - } - - if (wholeArg === '--') { - result._ = result._.concat(argv.slice(i + 1)); - break; - } - - if (wholeArg.length > 1 && wholeArg[0] === '-') { - /* eslint-disable operator-linebreak */ - const separatedArguments = (wholeArg[1] === '-' || wholeArg.length === 2) - ? [wholeArg] - : wholeArg.slice(1).split('').map(a => `-${a}`); - /* eslint-enable operator-linebreak */ - - for (let j = 0; j < separatedArguments.length; j++) { - const arg = separatedArguments[j]; - const [originalArgName, argStr] = arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined]; - - let argName = originalArgName; - while (argName in aliases) { - argName = aliases[argName]; - } - - if (!(argName in handlers)) { - if (permissive) { - result._.push(arg); - continue; - } else { - const err = new Error(`Unknown or unexpected option: ${originalArgName}`); - err.code = 'ARG_UNKNOWN_OPTION'; - throw err; - } - } - - const [type, isFlag] = handlers[argName]; - - if (!isFlag && ((j + 1) < separatedArguments.length)) { - throw new TypeError(`Option requires argument (but was followed by another short argument): ${originalArgName}`); - } - - if (isFlag) { - result[argName] = type(true, argName, result[argName]); - } else if (argStr === undefined) { - if ( - argv.length < i + 2 || - ( - argv[i + 1].length > 1 && - (argv[i + 1][0] === '-') && - !( - argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && - ( - type === Number || - // eslint-disable-next-line no-undef - (typeof BigInt !== 'undefined' && type === BigInt) - ) - ) - ) - ) { - const extended = originalArgName === argName ? '' : ` (alias for ${argName})`; - throw new Error(`Option requires argument: ${originalArgName}${extended}`); - } - - result[argName] = type(argv[i + 1], argName, result[argName]); - ++i; - } else { - result[argName] = type(argStr, argName, result[argName]); - } - } - } else { - result._.push(wholeArg); - } - } - - return result; -} - -arg.flag = fn => { - fn[flagSymbol] = true; - return fn; -}; - -// Utility types -arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1); - -module.exports = arg; diff --git a/node_modules/arg/package.json b/node_modules/arg/package.json deleted file mode 100644 index 720ef45..0000000 --- a/node_modules/arg/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_args": [ - [ - "arg@4.1.3", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "arg@4.1.3", - "_id": "arg@4.1.3", - "_inBundle": false, - "_integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "_location": "/arg", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "arg@4.1.3", - "name": "arg", - "escapedName": "arg", - "rawSpec": "4.1.3", - "saveSpec": null, - "fetchSpec": "4.1.3" - }, - "_requiredBy": [ - "/ts-node" - ], - "_resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "_spec": "4.1.3", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Josh Junon", - "email": "junon@zeit.co" - }, - "bugs": { - "url": "https://github.com/zeit/arg/issues" - }, - "description": "Another simple argument parser", - "devDependencies": { - "chai": "^4.1.1", - "jest": "^20.0.4", - "xo": "^0.18.2" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/zeit/arg#readme", - "license": "MIT", - "main": "index.js", - "name": "arg", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/arg.git" - }, - "scripts": { - "pretest": "xo", - "test": "WARN_EXIT=1 jest --coverage -w 2" - }, - "types": "index.d.ts", - "version": "4.1.3", - "xo": { - "rules": { - "complexity": 0, - "max-depth": 0, - "no-div-regex": 0 - } - } -} diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md deleted file mode 100644 index a43c628..0000000 --- a/node_modules/argparse/CHANGELOG.md +++ /dev/null @@ -1,185 +0,0 @@ -1.0.10 / 2018-02-15 ------------------- - -- Use .concat instead of + for arrays, #122. - - -1.0.9 / 2016-09-29 ------------------- - -- Rerelease after 1.0.8 - deps cleanup. - - -1.0.8 / 2016-09-29 ------------------- - -- Maintenance (deps bump, fix node 6.5+ tests, coverage report). - - -1.0.7 / 2016-03-17 ------------------- - -- Teach `addArgument` to accept string arg names. #97, @tomxtobin. - - -1.0.6 / 2016-02-06 ------------------- - -- Maintenance: moved to eslint & updated CS. - - -1.0.5 / 2016-02-05 ------------------- - -- Removed lodash dependency to significantly reduce install size. - Thanks to @mourner. - - -1.0.4 / 2016-01-17 ------------------- - -- Maintenance: lodash update to 4.0.0. - - -1.0.3 / 2015-10-27 ------------------- - -- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. - - -1.0.2 / 2015-03-22 ------------------- - -- Relaxed lodash version dependency. - - -1.0.1 / 2015-02-20 ------------------- - -- Changed dependencies to be compatible with ancient nodejs. - - -1.0.0 / 2015-02-19 ------------------- - -- Maintenance release. -- Replaced `underscore` with `lodash`. -- Bumped version to 1.0.0 to better reflect semver meaning. -- HISTORY.md -> CHANGELOG.md - - -0.1.16 / 2013-12-01 -------------------- - -- Maintenance release. Updated dependencies and docs. - - -0.1.15 / 2013-05-13 -------------------- - -- Fixed #55, @trebor89 - - -0.1.14 / 2013-05-12 -------------------- - -- Fixed #62, @maxtaco - - -0.1.13 / 2013-04-08 -------------------- - -- Added `.npmignore` to reduce package size - - -0.1.12 / 2013-02-10 -------------------- - -- Fixed conflictHandler (#46), @hpaulj - - -0.1.11 / 2013-02-07 -------------------- - -- Multiple bugfixes, @hpaulj -- Added 70+ tests (ported from python), @hpaulj -- Added conflictHandler, @applepicke -- Added fromfilePrefixChar, @hpaulj - - -0.1.10 / 2012-12-30 -------------------- - -- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj -- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -0.1.9 / 2012-12-27 ------------------- - -- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -- Fixed default value behavior with `*` positionals, thanks to @hpaulj -- Improve `getDefault()` behavior, thanks to @hpaulj -- Imrove negative argument parsing, thanks to @hpaulj - - -0.1.8 / 2012-12-01 ------------------- - -- Fixed parser parents (issue #19), thanks to @hpaulj -- Fixed negative argument parse (issue #20), thanks to @hpaulj - - -0.1.7 / 2012-10-14 ------------------- - -- Fixed 'choices' argument parse (issue #16) -- Fixed stderr output (issue #15) - - -0.1.6 / 2012-09-09 ------------------- - -- Fixed check for conflict of options (thanks to @tomxtobin) - - -0.1.5 / 2012-09-03 ------------------- - -- Fix parser #setDefaults method (thanks to @tomxtobin) - - -0.1.4 / 2012-07-30 ------------------- - -- Fixed pseudo-argument support (thanks to @CGamesPlay) -- Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -0.1.3 / 2012-06-27 ------------------- - -- Fixed formatter api name: Formatter -> HelpFormatter - - -0.1.2 / 2012-05-29 ------------------- - -- Added basic tests -- Removed excess whitespace in help -- Fixed error reporting, when parcer with subcommands - called with empty arguments - - -0.1.1 / 2012-05-23 ------------------- - -- Fixed line wrapping in help formatter -- Added better error reporting on invalid arguments - - -0.1.0 / 2012-05-16 ------------------- - -- First release. diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE deleted file mode 100644 index 1afdae5..0000000 --- a/node_modules/argparse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2012 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/argparse/README.md b/node_modules/argparse/README.md deleted file mode 100644 index 7fa6c40..0000000 --- a/node_modules/argparse/README.md +++ /dev/null @@ -1,257 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) -[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) - -CLI arguments parser for node.js. Javascript port of python's -[argparse](http://docs.python.org/dev/library/argparse.html) module -(original version 3.2). That's a full port, except some very rare options, -recorded in issue tracker. - -**NB. Difference with original.** - -- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). -- Use `defaultValue` instead of `default`. -- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and - similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE` - (aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and - `SUPPRESS`. - - -Example -======= - -test.js file: - -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse example' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); -parser.addArgument( - '--baz', - { - help: 'baz bar' - } -); -var args = parser.parseArgs(); -console.dir(args); -``` - -Display help: - -``` -$ ./test.js -h -usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] - -Argparse example - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo - --baz BAZ baz bar -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 --baz 5 -{ foo: '3', bar: '4', baz: '5' } -``` - -More [examples](https://github.com/nodeca/argparse/tree/master/examples). - - -ArgumentParser objects -====================== - -``` -new ArgumentParser({parameters hash}); -``` - -Creates a new ArgumentParser object. - -**Supported params:** - -- ```description``` - Text to display before the argument help. -- ```epilog``` - Text to display after the argument help. -- ```addHelp``` - Add a -h/–help option to the parser. (default: true) -- ```argumentDefault``` - Set the global default value for arguments. (default: null) -- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. -- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) -- ```formatterClass``` - A class for customizing the help output. -- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) -- ```usage``` - The string describing the program usage (default: generated) -- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. - -**Not supported yet** - -- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. - - -Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) - - -addArgument() method -==================== - -``` -ArgumentParser.addArgument(name or flag or [name] or [flags...], {options}) -``` - -Defines how a single command-line argument should be parsed. - -- ```name or flag or [name] or [flags...]``` - Either a positional name - (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array - of a single positional name (e.g., `['foo']`), or an array of options - (e.g., `['-f', '--foo']`). - -Options: - -- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. -- ```nargs```- The number of command-line arguments that should be consumed. -- ```constant``` - A constant value required by some action and nargs selections. -- ```defaultValue``` - The value produced if the argument is absent from the command line. -- ```type``` - The type to which the command-line argument should be converted. -- ```choices``` - A container of the allowable values for the argument. -- ```required``` - Whether or not the command-line option may be omitted (optionals only). -- ```help``` - A brief description of what the argument does. -- ```metavar``` - A name for the argument in usage messages. -- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). - -Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) - - -Action (some details) -================ - -ArgumentParser objects associate command-line arguments with actions. -These actions can do just about anything with the command-line arguments associated -with them, though most actions simply add an attribute to the object returned by -parseArgs(). The action keyword argument specifies how the command-line arguments -should be handled. The supported actions are: - -- ```store``` - Just stores the argument’s value. This is the default action. -- ```storeConst``` - Stores value, specified by the const keyword argument. - (Note that the const keyword argument defaults to the rather unhelpful None.) - The 'storeConst' action is most commonly used with optional arguments, that - specify some sort of flag. -- ```storeTrue``` and ```storeFalse``` - Stores values True and False - respectively. These are special cases of 'storeConst'. -- ```append``` - Stores a list, and appends each argument value to the list. - This is useful to allow an option to be specified multiple times. -- ```appendConst``` - Stores a list, and appends value, specified by the - const keyword argument to the list. (Note, that the const keyword argument defaults - is None.) The 'appendConst' action is typically used when multiple arguments need - to store constants to the same list. -- ```count``` - Counts the number of times a keyword argument occurs. For example, - used for increasing verbosity levels. -- ```help``` - Prints a complete help message for all the options in the current - parser and then exits. By default a help action is automatically added to the parser. - See ArgumentParser for details of how the output is created. -- ```version``` - Prints version information and exit. Expects a `version=` - keyword argument in the addArgument() call. - -Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) - - -Sub-commands -============ - -ArgumentParser.addSubparsers() - -Many programs split their functionality into a number of sub-commands, for -example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, -and `svn commit`. Splitting up functionality this way can be a particularly good -idea when a program performs several different functions which require different -kinds of command-line arguments. `ArgumentParser` supports creation of such -sub-commands with `addSubparsers()` method. The `addSubparsers()` method is -normally called with no arguments and returns an special action object. -This object has a single method `addParser()`, which takes a command name and -any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object -that can be modified as usual. - -Example: - -sub_commands.js -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse examples: sub-commands', -}); - -var subparsers = parser.addSubparsers({ - title:'subcommands', - dest:"subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp:true}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases:['co'], addHelp:true} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); - -var args = parser.parseArgs(); -console.dir(args); - -``` - -Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) - - -Contributors -============ - -- [Eugene Shkuropat](https://github.com/shkuropat) -- [Paul Jacobson](https://github.com/hpaulj) - -[others](https://github.com/nodeca/argparse/graphs/contributors) - -License -======= - -Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). -Released under the MIT license. See -[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. - - diff --git a/node_modules/argparse/index.js b/node_modules/argparse/index.js deleted file mode 100644 index 3bbc143..0000000 --- a/node_modules/argparse/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/argparse'); diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json deleted file mode 100644 index 98ccbb4..0000000 --- a/node_modules/argparse/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "argparse@1.0.10", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "argparse@1.0.10", - "_id": "argparse@1.0.10", - "_inBundle": false, - "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "_location": "/argparse", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "argparse@1.0.10", - "name": "argparse", - "escapedName": "argparse", - "rawSpec": "1.0.10", - "saveSpec": null, - "fetchSpec": "1.0.10" - }, - "_requiredBy": [ - "/js-yaml" - ], - "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "_spec": "1.0.10", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "contributors": [ - { - "name": "Eugene Shkuropat" - }, - { - "name": "Paul Jacobson" - } - ], - "dependencies": { - "sprintf-js": "~1.0.2" - }, - "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "devDependencies": { - "eslint": "^2.13.1", - "istanbul": "^0.4.5", - "mocha": "^3.1.0", - "ndoc": "^5.0.1" - }, - "files": [ - "index.js", - "lib/" - ], - "homepage": "https://github.com/nodeca/argparse#readme", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "license": "MIT", - "name": "argparse", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/argparse.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.0.10" -} diff --git a/node_modules/async-hook-jl/.eslintrc b/node_modules/async-hook-jl/.eslintrc deleted file mode 100644 index 7fe44f0..0000000 --- a/node_modules/async-hook-jl/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "root": true, - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - }, - "rules": { - "indent": [2, 2], - "quotes": [1, "single", "avoid-escape"], - "curly": 0, - "strict": [2, "global"], - "no-shadow": 0, - "no-underscore-dangle": 0, - "no-use-before-define": [1, "nofunc"], - "prefer-spread": 1, - "prefer-const": 1, - "no-console": 0, - "no-var": 1 - } -} diff --git a/node_modules/async-hook-jl/.npmignore b/node_modules/async-hook-jl/.npmignore deleted file mode 100644 index eb79dd5..0000000 --- a/node_modules/async-hook-jl/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.idea diff --git a/node_modules/async-hook-jl/.travis.yml b/node_modules/async-hook-jl/.travis.yml deleted file mode 100644 index 3051cf8..0000000 --- a/node_modules/async-hook-jl/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -script: - - "npm test" - -language: node_js - -node_js: - - "4" - - "6" - - "7" - -sudo: false diff --git a/node_modules/async-hook-jl/LICENSE.md b/node_modules/async-hook-jl/LICENSE.md deleted file mode 100644 index 4a0b8be..0000000 --- a/node_modules/async-hook-jl/LICENSE.md +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Andreas Madsen - -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/async-hook-jl/README.md b/node_modules/async-hook-jl/README.md deleted file mode 100644 index b916095..0000000 --- a/node_modules/async-hook-jl/README.md +++ /dev/null @@ -1,63 +0,0 @@ -[![Build Status](https://travis-ci.org/Jeff-Lewis/async-hook-jl.svg?branch=master)](https://travis-ci.org/Jeff-Lewis/async-hook-jl) - -#async-hook-jl - -> Inspect the life of handle objects in node - -## Documentation - -This is high level abstraction of the currently undocumented node API called -AsyncWrap. It patches some issues, makes the API more uniform and allows multiply -hooks to be created. - -I personally hope that most of this will make it into nodecore, but for now -it exists as an userland module. - -For the details of how AsyncWrap works and by extension how this module works, -please see the semi-official AsyncWrap documentation: -https://github.com/nodejs/diagnostics/blob/master/tracing/AsyncWrap/README.md - -```javascript -const asyncHook = require('async-hook-jl'); -``` - -#### Hooks - -The function arguments are: - -```javascript -function init(uid, handle, provider, parentUid, parentHandle) { /* your code */ } -function pre(uid, handle) { /* your code */ } -function post(uid, handle, didThrow) { /* your code */ } -function destroy(uid) { /* your code */ } -``` - -To add hooks: - -```javascript -asyncHook.addHooks({ init, pre, post, destroy }); -``` - -To remove hooks: - -```javascript -asyncHooks.removeHooks({ init, pre, post, destroy }); -``` - -All properties in the hooks object that `addHooks` and `removeHooks` takes are -optional. - -#### Providers - -The providers map is exposed as: -``` -asyncHook.providers[provider]; -``` - -#### Enable and disable - -You can enable and disable all hooks by using `asyncHook.enable()` and -`asyncHook.disable()`. By default it is disabled. - -Be careful about disabling the hooks, this will most likely conflict with other -modules that uses `async-hook-jl`. diff --git a/node_modules/async-hook-jl/async-hook.js b/node_modules/async-hook-jl/async-hook.js deleted file mode 100644 index 81c13e2..0000000 --- a/node_modules/async-hook-jl/async-hook.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -const asyncWrap = process.binding('async_wrap'); -const TIMERWRAP = asyncWrap.Providers.TIMERWRAP; - -const patchs = { - 'nextTick': require('./patches/next-tick.js'), - 'promise': require('./patches/promise.js'), - 'timers': require('./patches/timers.js') -}; - -const ignoreUIDs = new Set(); - -function State() { - this.enabled = false; - this.counter = 0; -} - -function Hooks() { - const initFns = this.initFns = []; - const preFns = this.preFns = []; - const postFns = this.postFns = []; - const destroyFns = this.destroyFns = []; - - this.init = function (uid, provider, parentUid, parentHandle) { - // Ignore TIMERWRAP, since setTimeout etc. is monkey patched - if (provider === TIMERWRAP) { - ignoreUIDs.add(uid); - return; - } - - // call hooks - for (const hook of initFns) { - hook(uid, this, provider, parentUid, parentHandle); - } - }; - - this.pre = function (uid) { - if (ignoreUIDs.has(uid)) return; - - // call hooks - for (const hook of preFns) { - hook(uid, this); - } - }; - - this.post = function (uid, didThrow) { - if (ignoreUIDs.has(uid)) return; - - // call hooks - for (const hook of postFns) { - hook(uid, this, didThrow); - } - }; - - this.destroy = function (uid) { - // Cleanup the ignore list if this uid should be ignored - if (ignoreUIDs.has(uid)) { - ignoreUIDs.delete(uid); - return; - } - - // call hooks - for (const hook of destroyFns) { - hook(uid); - } - }; -} - -Hooks.prototype.add = function (hooks) { - if (hooks.init) this.initFns.push(hooks.init); - if (hooks.pre) this.preFns.push(hooks.pre); - if (hooks.post) this.postFns.push(hooks.post); - if (hooks.destroy) this.destroyFns.push(hooks.destroy); -}; - -function removeElement(array, item) { - const index = array.indexOf(item); - if (index === -1) return; - array.splice(index, 1); -} - -Hooks.prototype.remove = function (hooks) { - if (hooks.init) removeElement(this.initFns, hooks.init); - if (hooks.pre) removeElement(this.preFns, hooks.pre); - if (hooks.post) removeElement(this.postFns, hooks.post); - if (hooks.destroy) removeElement(this.destroyFns, hooks.destroy); -}; - -function AsyncHook() { - this._state = new State(); - this._hooks = new Hooks(); - - // expose version for conflict detection - this.version = require('./package.json').version; - - // expose the Providers map - this.providers = asyncWrap.Providers; - - // apply patches - for (const key of Object.keys(patchs)) { - patchs[key].call(this); - } - - // setup async wrap - if (process.env.hasOwnProperty('NODE_ASYNC_HOOK_WARNING')) { - console.warn('warning: you are using async-hook-jl which is unstable.'); - } - asyncWrap.setupHooks({ - init: this._hooks.init, - pre: this._hooks.pre, - post: this._hooks.post, - destroy: this._hooks.destroy - }); -} -module.exports = AsyncHook; - -AsyncHook.prototype.addHooks = function (hooks) { - this._hooks.add(hooks); -}; - -AsyncHook.prototype.removeHooks = function (hooks) { - this._hooks.remove(hooks); -}; - -AsyncHook.prototype.enable = function () { - this._state.enabled = true; - asyncWrap.enable(); -}; - -AsyncHook.prototype.disable = function () { - this._state.enabled = false; - asyncWrap.disable(); -}; \ No newline at end of file diff --git a/node_modules/async-hook-jl/index.js b/node_modules/async-hook-jl/index.js deleted file mode 100644 index 0b5e7d3..0000000 --- a/node_modules/async-hook-jl/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const AsyncHook = require('./async-hook.js'); - -// If a another copy (same version or not) of stack-chain exists it will result -// in wrong stack traces (most likely dublicate callSites). -if (global._asyncHook) { - // In case the version match, we can simply return the first initialized copy - if (global._asyncHook.version === require('./package.json').version) { - module.exports = global._asyncHook; - } - // The version don't match, this is really bad. Lets just throw - else { - throw new Error('Conflicting version of async-hook-jl found'); - } -} else { - const stackChain = require('stack-chain'); - - // Remove callSites from this module. AsyncWrap doesn't have any callSites - // and the hooks are expected to be completely transparent. - stackChain.filter.attach(function (error, frames) { - return frames.filter(function (callSite) { - const filename = callSite.getFileName(); - // filename is not always a string, for example in case of eval it is - // undefined. So check if the filename is defined. - return !(filename && filename.slice(0, __dirname.length) === __dirname); - }); - }); - - module.exports = global._asyncHook = new AsyncHook(); -} \ No newline at end of file diff --git a/node_modules/async-hook-jl/package.json b/node_modules/async-hook-jl/package.json deleted file mode 100644 index ca50f49..0000000 --- a/node_modules/async-hook-jl/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "async-hook-jl@1.7.6", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_from": "async-hook-jl@1.7.6", - "_id": "async-hook-jl@1.7.6", - "_inBundle": false, - "_integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==", - "_location": "/async-hook-jl", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "async-hook-jl@1.7.6", - "name": "async-hook-jl", - "escapedName": "async-hook-jl", - "rawSpec": "1.7.6", - "saveSpec": null, - "fetchSpec": "1.7.6" - }, - "_requiredBy": [ - "/cls-hooked" - ], - "_resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz", - "_spec": "1.7.6", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Andreas Madsen", - "email": "amwebdk@gmail.com" - }, - "bugs": { - "url": "https://github.com/jeff-lewis/async-hook-jl/issues" - }, - "dependencies": { - "stack-chain": "^1.3.7" - }, - "description": "Inspect the life of handle objects in node", - "devDependencies": { - "async": "1.5.x", - "cli-color": "1.1.x", - "endpoint": "0.4.x", - "eslint": "^3.4.0" - }, - "engines": { - "node": "^4.7 || >=6.9 || >=7.3" - }, - "homepage": "https://github.com/jeff-lewis/async-hook-jl#readme", - "keywords": [ - "async", - "async hooks", - "inspect", - "async wrap" - ], - "license": "MIT", - "main": "./index.js", - "name": "async-hook-jl", - "repository": { - "type": "git", - "url": "git://github.com/jeff-lewis/async-hook-jl.git" - }, - "scripts": { - "test": "node ./test/runner.js && eslint ." - }, - "version": "1.7.6" -} diff --git a/node_modules/async-hook-jl/patches/next-tick.js b/node_modules/async-hook-jl/patches/next-tick.js deleted file mode 100644 index 525bd7a..0000000 --- a/node_modules/async-hook-jl/patches/next-tick.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -function NextTickWrap() {} - -module.exports = function patch() { - const hooks = this._hooks; - const state = this._state; - - const oldNextTick = process.nextTick; - process.nextTick = function () { - if (!state.enabled) return oldNextTick.apply(process, arguments); - - const args = new Array(arguments.length); - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - const callback = args[0]; - - if (typeof callback !== 'function') { - throw new TypeError('callback is not a function'); - } - - const handle = new NextTickWrap(); - const uid = --state.counter; - - // call the init hook - hooks.init.call(handle, uid, 0, null, null); - - // overwrite callback - args[0] = function () { - // call the pre hook - hooks.pre.call(handle, uid); - - let didThrow = true; - try { - callback.apply(this, arguments); - didThrow = false; - } finally { - // If `callback` threw and there is an uncaughtException handler - // then call the `post` and `destroy` hook after the uncaughtException - // user handlers have been invoked. - if(didThrow && process.listenerCount('uncaughtException') > 0) { - process.once('uncaughtException', function () { - hooks.post.call(handle, uid, true); - hooks.destroy.call(null, uid); - }); - } - } - - // callback done successfully - hooks.post.call(handle, uid, false); - hooks.destroy.call(null, uid); - }; - - return oldNextTick.apply(process, args); - }; -} diff --git a/node_modules/async-hook-jl/patches/promise.js b/node_modules/async-hook-jl/patches/promise.js deleted file mode 100644 index 6e81753..0000000 --- a/node_modules/async-hook-jl/patches/promise.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -function PromiseWrap() {} - -module.exports = function patchPromise() { - const hooks = this._hooks; - const state = this._state; - - const Promise = global.Promise; - - /* As per ECMAScript 2015, .catch must be implemented by calling .then, as - * such we need needn't patch .catch as well. see: - * http://www.ecma-international.org/ecma-262/6.0/#sec-promise.prototype.catch - */ - const oldThen = Promise.prototype.then; - Promise.prototype.then = wrappedThen; - - function makeWrappedHandler(fn, handle, uid, isOnFulfilled) { - if ('function' !== typeof fn) { - return isOnFulfilled - ? makeUnhandledResolutionHandler(uid) - : makeUnhandledRejectionHandler(uid); - } - - return function wrappedHandler() { - hooks.pre.call(handle, uid); - try { - return fn.apply(this, arguments); - } finally { - hooks.post.call(handle, uid, false); - hooks.destroy.call(null, uid); - } - }; - } - - function makeUnhandledResolutionHandler(uid) { - return function unhandledResolutionHandler(val) { - hooks.destroy.call(null, uid); - return val; - }; - } - - function makeUnhandledRejectionHandler(uid) { - return function unhandledRejectedHandler(val) { - hooks.destroy.call(null, uid); - throw val; - }; - } - - function wrappedThen(onFulfilled, onRejected) { - if (!state.enabled) return oldThen.call(this, onFulfilled, onRejected); - - const handle = new PromiseWrap(); - const uid = --state.counter; - - hooks.init.call(handle, uid, 0, null, null); - - return oldThen.call( - this, - makeWrappedHandler(onFulfilled, handle, uid, true), - makeWrappedHandler(onRejected, handle, uid, false) - ); - } -}; diff --git a/node_modules/async-hook-jl/patches/timers.js b/node_modules/async-hook-jl/patches/timers.js deleted file mode 100644 index 79e80c9..0000000 --- a/node_modules/async-hook-jl/patches/timers.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -const timers = require('timers'); - -function TimeoutWrap() {} -function IntervalWrap() {} -function ImmediateWrap() {} - -const timeoutMap = new Map(); -const intervalMap = new Map(); -const ImmediateMap = new Map(); - -let activeCallback = null; -let clearedInCallback = false; - -module.exports = function patch() { - patchTimer(this._hooks, this._state, 'setTimeout', 'clearTimeout', TimeoutWrap, timeoutMap, true); - patchTimer(this._hooks, this._state, 'setInterval', 'clearInterval', IntervalWrap, intervalMap, false); - patchTimer(this._hooks, this._state, 'setImmediate', 'clearImmediate', ImmediateWrap, ImmediateMap, true); - - global.setTimeout = timers.setTimeout; - global.setInterval = timers.setInterval; - global.setImmediate = timers.setImmediate; - - global.clearTimeout = timers.clearTimeout; - global.clearInterval = timers.clearInterval; - global.clearImmediate = timers.clearImmediate; -}; - -function patchTimer(hooks, state, setFn, clearFn, Handle, timerMap, singleCall) { - const oldSetFn = timers[setFn]; - const oldClearFn = timers[clearFn]; - - // overwrite set[Timeout] - timers[setFn] = function () { - if (!state.enabled) return oldSetFn.apply(timers, arguments); - - const args = new Array(arguments.length); - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - const callback = args[0]; - - if (typeof callback !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - - const handle = new Handle(); - const uid = --state.counter; - let timerId = undefined; - - // call the init hook - hooks.init.call(handle, uid, 0, null, null); - - // overwrite callback - args[0] = function () { - // call the pre hook - activeCallback = timerId; - hooks.pre.call(handle, uid); - - let didThrow = true; - try { - callback.apply(this, arguments); - didThrow = false; - } finally { - // If `callback` threw and there is an uncaughtException handler - // then call the `post` and `destroy` hook after the uncaughtException - // user handlers have been invoked. - if (didThrow && process.listenerCount('uncaughtException') > 0) { - process.once('uncaughtException', function () { - // call the post hook - hooks.post.call(handle, uid, true); - // setInterval won't continue - timerMap.delete(timerId); - hooks.destroy.call(null, uid); - }); - } - } - - // callback done successfully - hooks.post.call(handle, uid, false); - activeCallback = null; - - // call the destroy hook if the callback will only be called once - if (singleCall || clearedInCallback) { - clearedInCallback = false; - timerMap.delete(timerId); - hooks.destroy.call(null, uid); - } - }; - - timerId = oldSetFn.apply(timers, args); - // Bind the timerId and uid for later use, in case the clear* function is - // called. - timerMap.set(timerId, uid); - - return timerId; - }; - - // overwrite clear[Timeout] - timers[clearFn] = function (timerId) { - // If clear* was called within the timer callback, then delay the destroy - // event to after the post event has been called. - if (activeCallback === timerId && timerId !== null) { - clearedInCallback = true; - } - // clear should call the destroy hook. Note if timerId doesn't exists - // it is because asyncWrap wasn't enabled at the time. - else if (timerMap.has(timerId)) { - const uid = timerMap.get(timerId); - timerMap.delete(timerId); - hooks.destroy.call(null, uid); - } - - oldClearFn.apply(timers, arguments); - }; -} diff --git a/node_modules/async-hook-jl/test/runner.js b/node_modules/async-hook-jl/test/runner.js deleted file mode 100644 index ed43afe..0000000 --- a/node_modules/async-hook-jl/test/runner.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const async = require('async'); -const spawn = require('child_process').spawn; -const clc = require('cli-color'); - -const allFailed = clc.red.bold; -const allPassed = clc.green; - -const failed = clc.yellow; -const passed = (t) => t; - -const files = fs.readdirSync(__dirname).filter(function (filename) { - return filename.slice(0, 5) === 'test-'; -}); - -async.mapSeries(files, runTest, function (err, passed) { - if (err) throw err; - - let failed = 0; - for (const ok of passed) { - if (!ok) failed += 1; - } - - if (failed > 0) { - console.log(allFailed('failed') + ` - ${failed} tests failed`); - } else { - console.log(allPassed('passed') + ` - ${passed.length} tests passed`); - } -}); - -function runTest(filename, done) { - process.stdout.write(` - running ${filename} ...`); - - const p = spawn(process.execPath, [path.resolve(__dirname, filename)], { - stdio: ['ignore', 1, 2], - env: { - 'NODE_ASYNC_HOOK_NO_WARNING': '1' - } - }); - - p.once('close', function (statusCode) { - const ok = (statusCode === 0); - - if (ok) { - console.log(' ' + passed('ok')); - } else { - console.log(' - ' + failed('failed')); - } - - done(null, ok); - }); -} diff --git a/node_modules/async-hook-jl/test/test-conflict-match.js b/node_modules/async-hook-jl/test/test-conflict-match.js deleted file mode 100644 index bb2fc9a..0000000 --- a/node_modules/async-hook-jl/test/test-conflict-match.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -const existing = global._asyncHook = { - version: require('../package.json').version -}; - -const asyncHook = require('../'); - -assert.equal(asyncHook, existing); diff --git a/node_modules/async-hook-jl/test/test-conflict-mismatch.js b/node_modules/async-hook-jl/test/test-conflict-mismatch.js deleted file mode 100644 index d2c805c..0000000 --- a/node_modules/async-hook-jl/test/test-conflict-mismatch.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -global._asyncHook = { - version: '0.0.0' -}; - -try { - require('../'); -} catch (e) { - assert.equal(e.message, 'Conflicting version of async-hook-jl found'); -} \ No newline at end of file diff --git a/node_modules/async-hook-jl/test/test-fsaccess-disabled.js b/node_modules/async-hook-jl/test/test-fsaccess-disabled.js deleted file mode 100644 index 38d66fe..0000000 --- a/node_modules/async-hook-jl/test/test-fsaccess-disabled.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); -const fs = require('fs'); - -let called = false; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -fs.access(__filename, function () { - called = true; -}); - -process.once('exit', function () { - assert.equal(called, true); -}); diff --git a/node_modules/async-hook-jl/test/test-fsaccess-enabled.js b/node_modules/async-hook-jl/test/test-fsaccess-enabled.js deleted file mode 100644 index f46ad25..0000000 --- a/node_modules/async-hook-jl/test/test-fsaccess-enabled.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); -const fs = require('fs'); - -let called = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; -let postDidThrow = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle, didThrow) { - postUid = uid; - postHandle = handle; - postDidThrow = didThrow; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -fs.access(__filename, function () { - called = true; -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'FSReqWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, asyncHook.providers.FSREQWRAP); - - assert.equal(postDidThrow, false); - - assert.equal(called, true); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-hooks-remove.js b/node_modules/async-hook-jl/test/test-hooks-remove.js deleted file mode 100644 index 37e1234..0000000 --- a/node_modules/async-hook-jl/test/test-hooks-remove.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); -const fs = require('fs'); - -let called = false; - -let initCalls = 0; -let preCalls = 0; -let postCalls = 0; -let destroyCalls = 0; - -const hooks = { - init: function () { - initCalls += 1; - }, - pre: function () { - preCalls += 1; - }, - post: function () { - postCalls += 1; - }, - destroy: function () { - destroyCalls += 1; - } -}; - -asyncHook.addHooks(hooks); -asyncHook.addHooks(hooks); -asyncHook.removeHooks(hooks); - -asyncHook.enable(); - -fs.access(__filename, function () { - called = true; -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(called, true); - - assert.equal(initCalls, 1); - assert.equal(preCalls, 1); - assert.equal(postCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-hooks-twice.js b/node_modules/async-hook-jl/test/test-hooks-twice.js deleted file mode 100644 index 868afdc..0000000 --- a/node_modules/async-hook-jl/test/test-hooks-twice.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); -const fs = require('fs'); - -let called = false; - -let initCalls = 0; -let preCalls = 0; -let postCalls = 0; -let destroyCalls = 0; - -const hooks = { - init: function () { - initCalls += 1; - }, - pre: function () { - preCalls += 1; - }, - post: function () { - postCalls += 1; - }, - destroy: function () { - destroyCalls += 1; - } -}; - -asyncHook.addHooks(hooks); -asyncHook.addHooks(hooks); - -asyncHook.enable(); - -fs.access(__filename, function () { - called = true; -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(called, true); - - assert.equal(initCalls, 2); - assert.equal(preCalls, 2); - assert.equal(postCalls, 2); - assert.equal(destroyCalls, 2); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-clear-in-callback.js b/node_modules/async-hook-jl/test/test-immediate-clear-in-callback.js deleted file mode 100644 index dbe6f34..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-clear-in-callback.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const timings = []; - -asyncHook.addHooks({ - init: function (uid, handle) { - timings.push(`init#${uid} - ${handle.constructor.name}`); - }, - pre: function (uid) { - timings.push(`pre#${uid}`); - }, - post: function (uid) { - timings.push(`post#${uid}`); - }, - destroy: function (uid) { - timings.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); -const timerId = setImmediate(() => { - timings.push('callback'); - clearImmediate(timerId); -}, 100); -asyncHook.disable(); - -process.once('exit', function () { - assert.deepEqual(timings, [ - 'init#-1 - ImmediateWrap', - 'pre#-1', - 'callback', - 'post#-1', - 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-clear.js b/node_modules/async-hook-jl/test/test-immediate-clear.js deleted file mode 100644 index 4c06f10..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-clear.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandleName = ''; -let initParent = {}; -let initProvider = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandleName = handle.constructor.name; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -const timerId = setImmediate(function () { - timerCalled = true; -}); - -clearImmediate(timerId); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, destroyUid); - - assert.equal(initHandleName, 'ImmediateWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(timerCalled, false); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-didthrow.js b/node_modules/async-hook-jl/test/test-immediate-didthrow.js deleted file mode 100644 index 16fe524..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-didthrow.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const eventOrder = []; - -let throwFlag = null; - -asyncHook.addHooks({ - init: function (uid, handle) { - eventOrder.push(`init#${uid} ${handle.constructor.name}`); - }, - pre: function (uid) { - eventOrder.push(`pre#${uid}`); - }, - post: function (uid, handle, didThrow) { - throwFlag = didThrow; - eventOrder.push(`post#${uid}`); - }, - destroy: function (uid) { - eventOrder.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); - -process.once('uncaughtException', function () { - eventOrder.push('exception'); -}); - -setImmediate(function () { - eventOrder.push('callback'); - throw new Error('error'); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.strictEqual(throwFlag, true); - assert.deepEqual(eventOrder, [ - 'init#-1 ImmediateWrap', 'pre#-1', - 'callback', 'exception', - 'post#-1', 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-disabled.js b/node_modules/async-hook-jl/test/test-immediate-disabled.js deleted file mode 100644 index 7d77b48..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-disabled.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerACalled = false; -let timerBCalled = false; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -const timerId = setImmediate(function () { - timerACalled = true; -}); - -clearImmediate(timerId); - -setImmediate(function (arg1, arg2) { - timerBCalled = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 'a', 'b'); - -process.once('exit', function () { - assert.equal(timerACalled, false); - assert.equal(timerBCalled, true); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-enabled.js b/node_modules/async-hook-jl/test/test-immediate-enabled.js deleted file mode 100644 index 9ae4f41..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-enabled.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; -let postDidThrow = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle, didThrow) { - postUid = uid; - postHandle = handle; - postDidThrow = didThrow; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -setImmediate(function (arg1, arg2) { - timerCalled = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 'a', 'b'); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'ImmediateWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(postDidThrow, false); - - assert.equal(timerCalled, true); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-immediate-exception.js b/node_modules/async-hook-jl/test/test-immediate-exception.js deleted file mode 100644 index 46489b6..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-exception.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -if (process.env.hasOwnProperty('ASYNC_HOOK_TEST_CHILD')) { - const asyncHook = require('../'); - - asyncHook.enable(); - - setImmediate(function () { - throw new Error('test error'); - }); -} else { - const spawn = require('child_process').spawn; - const endpoint = require('endpoint'); - - const child = spawn(process.execPath, [__filename], { - env: Object.assign({ ASYNC_HOOK_TEST_CHILD: '' }, process.env), - stdio: ['ignore', 1, 'pipe'] - }); - - let stderr = null; - child.stderr.pipe(endpoint(function (err, _stderr) { - if (err) throw err; - stderr = _stderr; - })); - - child.once('close', function (statusCode) { - if (statusCode !== 1 || stderr.toString().indexOf('test error') === -1) { - process.stderr.write(stderr); - process.exit(statusCode); - } - }); -} diff --git a/node_modules/async-hook-jl/test/test-immediate-non-function.js b/node_modules/async-hook-jl/test/test-immediate-non-function.js deleted file mode 100644 index a4ea4fb..0000000 --- a/node_modules/async-hook-jl/test/test-immediate-non-function.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -asyncHook.enable(); - -let throws = false; -try { - setImmediate(undefined, 1); -} catch (e) { - assert.equal(e.message, '"callback" argument must be a function'); - assert.equal(e.name, 'TypeError'); - throws = true; -} - -asyncHook.disable(); - -process.once('exit', function () { - assert(throws); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-clear-in-callback.js b/node_modules/async-hook-jl/test/test-interval-clear-in-callback.js deleted file mode 100644 index 4a16c75..0000000 --- a/node_modules/async-hook-jl/test/test-interval-clear-in-callback.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const timings = []; - -asyncHook.addHooks({ - init: function (uid, handle) { - timings.push(`init#${uid} - ${handle.constructor.name}`); - }, - pre: function (uid) { - timings.push(`pre#${uid}`); - }, - post: function (uid) { - timings.push(`post#${uid}`); - }, - destroy: function (uid) { - timings.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); -const timerId = setInterval(() => { - timings.push('callback'); - clearInterval(timerId); -}, 100); -asyncHook.disable(); - -process.once('exit', function () { - assert.deepEqual(timings, [ - 'init#-1 - IntervalWrap', - 'pre#-1', - 'callback', - 'post#-1', - 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-clear.js b/node_modules/async-hook-jl/test/test-interval-clear.js deleted file mode 100644 index dc7fccc..0000000 --- a/node_modules/async-hook-jl/test/test-interval-clear.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandleName = ''; -let initParent = {}; -let initProvider = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandleName = handle.constructor.name; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -const timerId = setInterval(function () { - timerCalled = true; -}); - -clearInterval(timerId); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, destroyUid); - - assert.equal(initHandleName, 'IntervalWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(timerCalled, false); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-didthrow.js b/node_modules/async-hook-jl/test/test-interval-didthrow.js deleted file mode 100644 index 0a88c21..0000000 --- a/node_modules/async-hook-jl/test/test-interval-didthrow.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const eventOrder = []; - -let throwFlag = null; - -asyncHook.addHooks({ - init: function (uid, handle) { - eventOrder.push(`init#${uid} ${handle.constructor.name}`); - }, - pre: function (uid) { - eventOrder.push(`pre#${uid}`); - }, - post: function (uid, handle, didThrow) { - throwFlag = didThrow; - eventOrder.push(`post#${uid}`); - }, - destroy: function (uid) { - eventOrder.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); - -process.once('uncaughtException', function () { - eventOrder.push('exception'); -}); - -setInterval(function () { - eventOrder.push('callback'); - throw new Error('error'); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.strictEqual(throwFlag, true); - assert.deepEqual(eventOrder, [ - 'init#-1 IntervalWrap', 'pre#-1', - 'callback', 'exception', - 'post#-1', 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-disabled.js b/node_modules/async-hook-jl/test/test-interval-disabled.js deleted file mode 100644 index 2491e35..0000000 --- a/node_modules/async-hook-jl/test/test-interval-disabled.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerACalled = false; -let timerBCalled = false; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -const timerAId = setInterval(function () { - timerACalled = true; -}); -clearInterval(timerAId); - -const timerBId = setInterval(function (arg1, arg2) { - timerBCalled = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); - clearInterval(timerBId); -}, 0, 'a', 'b'); - -process.once('exit', function () { - assert.equal(timerACalled, false); - assert.equal(timerBCalled, true); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-enabled.js b/node_modules/async-hook-jl/test/test-interval-enabled.js deleted file mode 100644 index 13d11d7..0000000 --- a/node_modules/async-hook-jl/test/test-interval-enabled.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = 0; - -let initCalls = 0; -let preCalls = 0; -let postCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; -let postDidThrow = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - - preCalls += 1; - }, - post: function (uid, handle, didThrow) { - postUid = uid; - postHandle = handle; - postDidThrow = didThrow; - - postCalls += 1; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -const timerId = setInterval(function (arg1, arg2) { - timerCalled += 1; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); - - if (timerCalled === 2) clearInterval(timerId); -}, 0, 'a', 'b'); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'IntervalWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(postDidThrow, false); - - assert.equal(timerCalled, 2); - assert.equal(initCalls, 1); - assert.equal(preCalls, 2); - assert.equal(postCalls, 2); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-interval-exception.js b/node_modules/async-hook-jl/test/test-interval-exception.js deleted file mode 100644 index 65f8855..0000000 --- a/node_modules/async-hook-jl/test/test-interval-exception.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -if (process.env.hasOwnProperty('ASYNC_HOOK_TEST_CHILD')) { - const asyncHook = require('../'); - - asyncHook.enable(); - - setInterval(function () { - throw new Error('test error'); - }); -} else { - const spawn = require('child_process').spawn; - const endpoint = require('endpoint'); - - const child = spawn(process.execPath, [__filename], { - env: Object.assign({ ASYNC_HOOK_TEST_CHILD: '' }, process.env), - stdio: ['ignore', 1, 'pipe'] - }); - - let stderr = null; - child.stderr.pipe(endpoint(function (err, _stderr) { - if (err) throw err; - stderr = _stderr; - })); - - child.once('close', function (statusCode) { - if (statusCode !== 1 || stderr.toString().indexOf('test error') === -1) { - process.stderr.write(stderr); - process.exit(statusCode); - } - }); -} diff --git a/node_modules/async-hook-jl/test/test-interval-non-function.js b/node_modules/async-hook-jl/test/test-interval-non-function.js deleted file mode 100644 index 690a707..0000000 --- a/node_modules/async-hook-jl/test/test-interval-non-function.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -asyncHook.enable(); - -let throws = false; -try { - setInterval(undefined, 1); -} catch (e) { - assert.equal(e.message, '"callback" argument must be a function'); - assert.equal(e.name, 'TypeError'); - throws = true; -} - -asyncHook.disable(); - -process.once('exit', function () { - assert(throws); -}); diff --git a/node_modules/async-hook-jl/test/test-nexttick-didthrow.js b/node_modules/async-hook-jl/test/test-nexttick-didthrow.js deleted file mode 100644 index b375b44..0000000 --- a/node_modules/async-hook-jl/test/test-nexttick-didthrow.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const eventOrder = []; - -let throwFlag = null; - -asyncHook.addHooks({ - init: function (uid, handle) { - eventOrder.push(`init#${uid} ${handle.constructor.name}`); - }, - pre: function (uid) { - eventOrder.push(`pre#${uid}`); - }, - post: function (uid, handle, didThrow) { - throwFlag = didThrow; - eventOrder.push(`post#${uid}`); - }, - destroy: function (uid) { - eventOrder.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); - -process.once('uncaughtException', function () { - eventOrder.push('exception'); -}); - -process.nextTick(function () { - eventOrder.push('callback'); - throw new Error('error'); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.strictEqual(throwFlag, true); - assert.deepEqual(eventOrder, [ - 'init#-1 NextTickWrap', 'pre#-1', - 'callback', 'exception', - 'post#-1', 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-nexttick-disabled.js b/node_modules/async-hook-jl/test/test-nexttick-disabled.js deleted file mode 100644 index 732893a..0000000 --- a/node_modules/async-hook-jl/test/test-nexttick-disabled.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let called = false; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -process.nextTick(function (arg1, arg2) { - called = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 'a', 'b'); - -process.once('exit', function () { - assert.equal(called, true); -}); diff --git a/node_modules/async-hook-jl/test/test-nexttick-enabled.js b/node_modules/async-hook-jl/test/test-nexttick-enabled.js deleted file mode 100644 index 83fdf21..0000000 --- a/node_modules/async-hook-jl/test/test-nexttick-enabled.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let called = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; -let postDidThrow = NaN; - -let postHandle = {}; -let postUid = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle, didThrow) { - postUid = uid; - postHandle = handle; - postDidThrow = didThrow; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -process.nextTick(function (arg1, arg2) { - called = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 'a', 'b'); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'NextTickWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(postDidThrow, false); - - assert.equal(called, true); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-nexttick-exception.js b/node_modules/async-hook-jl/test/test-nexttick-exception.js deleted file mode 100644 index 5635d91..0000000 --- a/node_modules/async-hook-jl/test/test-nexttick-exception.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -if (process.env.hasOwnProperty('ASYNC_HOOK_TEST_CHILD')) { - const asyncHook = require('../'); - - asyncHook.enable(); - - process.nextTick(function () { - throw new Error('test error'); - }); -} else { - const spawn = require('child_process').spawn; - const endpoint = require('endpoint'); - - const child = spawn(process.execPath, [__filename], { - env: Object.assign({ ASYNC_HOOK_TEST_CHILD: '' }, process.env), - stdio: ['ignore', 1, 'pipe'] - }); - - let stderr = null; - child.stderr.pipe(endpoint(function (err, _stderr) { - if (err) throw err; - stderr = _stderr; - })); - - child.once('close', function (statusCode) { - if (statusCode !== 1 || stderr.toString().indexOf('test error') === -1) { - process.stderr.write(stderr); - process.exit(statusCode); - } - }); -} diff --git a/node_modules/async-hook-jl/test/test-nexttick-non-function.js b/node_modules/async-hook-jl/test/test-nexttick-non-function.js deleted file mode 100644 index bba245a..0000000 --- a/node_modules/async-hook-jl/test/test-nexttick-non-function.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -asyncHook.enable(); - -let throws = false; -try { - process.nextTick(undefined, 1); -} catch (e) { - assert.equal(e.message, 'callback is not a function'); - assert.equal(e.name, 'TypeError'); - throws = true; -} - -asyncHook.disable(); - -process.once('exit', function () { - assert(throws); -}); diff --git a/node_modules/async-hook-jl/test/test-parent.js b/node_modules/async-hook-jl/test/test-parent.js deleted file mode 100644 index 68a62b7..0000000 --- a/node_modules/async-hook-jl/test/test-parent.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); -const net = require('net'); - -let called = false; -let firstHook = true; - -let initCalls = 0; - -let serverHandle = {}; -let serverUid = NaN; - -let clientParentHandle = {}; -let clientParentUid = NaN; - - -asyncHook.addHooks({ - init: function (uid, handle, provider, parentUid, parentHandle) { - if (provider != asyncHook.providers.TCPWRAP) return; - - if (firstHook) { - firstHook = false; - - serverUid = uid; - serverHandle = handle; - - assert.equal(parentUid, null); - assert.equal(parentHandle, null); - } else { - clientParentHandle = parentHandle; - clientParentUid = parentUid; - } - - initCalls += 1; - } -}); - -asyncHook.enable(); - -const server = net.createServer(function (socket) { - socket.end(); - server.close(); - called = true; -}).listen(function () { - net.connect(this.address()); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(serverHandle, clientParentHandle); - assert.equal(serverUid, clientParentUid); - - assert.equal(called, true); - assert.equal(initCalls, 2); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-catch-enabled.js b/node_modules/async-hook-jl/test/test-promise-catch-enabled.js deleted file mode 100644 index 6aed378..0000000 --- a/node_modules/async-hook-jl/test/test-promise-catch-enabled.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let rejctedCalled = false; -let rejectedArg = null; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle) { - postUid = uid; - postHandle = handle; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -Promise - .reject('a') - .catch(arg => { - rejctedCalled = true; - rejectedArg = arg; - }); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'PromiseWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(rejctedCalled, true); - assert.equal(rejectedArg, 'a'); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-catch-then-chain-fulfilled-enabled.js b/node_modules/async-hook-jl/test/test-promise-catch-then-chain-fulfilled-enabled.js deleted file mode 100644 index 97e2bf3..0000000 --- a/node_modules/async-hook-jl/test/test-promise-catch-then-chain-fulfilled-enabled.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let rejectedCalled = false; -let fulfilledCalled = false; -let fulfilledArg = null; - -const initUid = []; -const initHandle = []; -const initProvider = []; -const initParent = []; - -const preUid = []; -const preHandle = []; - -const postUid = []; -const postHandle = []; - -const destroyUid = []; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid.push(uid); - initHandle.push(handle); - initProvider.push(provider); - initParent.push(parent); - }, - pre: function (uid, handle) { - preUid.push(uid); - preHandle.push(handle); - }, - post: function (uid, handle) { - postUid.push(uid); - postHandle.push(handle); - }, - destroy: function (uid) { - destroyUid.push(uid); - } -}); - -asyncHook.enable(); - -Promise - .resolve('a') - .catch(() => { - rejectedCalled = true; - }) - .then(arg => { - fulfilledCalled = true; - fulfilledArg = arg; - }); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid.length, 2, 'both handlers should init'); - assert.equal(preUid.length, 1, 'only the .then should pre'); - assert.equal(postUid.length, 1, 'only the .then should post'); - assert.equal(destroyUid.length, 2, 'both handlers should destroy'); - - assert.equal(initUid[0], destroyUid[0]); - - assert.equal(initUid[1], preUid[0]); - assert.equal(initUid[1], postUid[0]); - assert.equal(initUid[1], destroyUid[1]); - assert.equal(initHandle[1], preHandle[0]); - assert.equal(initHandle[1], postHandle[0]); - - for (let i = 0; i < 2; ++i) { - assert.equal(initHandle[i].constructor.name, 'PromiseWrap'); - assert.equal(initParent[i], null); - assert.equal(initProvider[i], 0); - } - - assert.equal(rejectedCalled, false); - assert.equal(fulfilledCalled, true); - assert.equal(fulfilledArg, 'a'); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-disabled.js b/node_modules/async-hook-jl/test/test-promise-disabled.js deleted file mode 100644 index 407b49c..0000000 --- a/node_modules/async-hook-jl/test/test-promise-disabled.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const thenHandlersCalledA = [false, false]; -const thenHandlersCalledB = [false, false]; -let catchHandlerCalledC = false; -let catchHandlerCalledD = false; - -let fulfilledArgA = null; -let rejectedArgB = null; -let rejectedArgC = null; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -Promise - .resolve('a') - .then(arg => { - fulfilledArgA = arg; - thenHandlersCalledA[0] = true; - }, () => { - thenHandlersCalledA[1] = true; - }); - -Promise - .reject('b') - .then(() => { - thenHandlersCalledB[0] = true; - }, arg => { - rejectedArgB = arg; - thenHandlersCalledB[1] = true; - }); - -Promise - .reject('c') - .catch(arg => { - rejectedArgC = arg; - catchHandlerCalledC = true; - }); - -Promise - .resolve('d') - .catch(() => { - catchHandlerCalledD = true; - }); - -process.once('exit', function () { - assert.deepStrictEqual(thenHandlersCalledA, [true, false]); - assert.equal(fulfilledArgA, 'a'); - assert.deepStrictEqual(thenHandlersCalledB, [false, true]); - assert.equal(rejectedArgB, 'b'); - assert.equal(catchHandlerCalledC, true); - assert.equal(rejectedArgC, 'c'); - assert.equal(catchHandlerCalledD, false); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-then-catch-chain-rejected-enabled.js b/node_modules/async-hook-jl/test/test-promise-then-catch-chain-rejected-enabled.js deleted file mode 100644 index 16e9ba3..0000000 --- a/node_modules/async-hook-jl/test/test-promise-then-catch-chain-rejected-enabled.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let fulfilledCalled = false; -let rejectedCalled = false; -let rejectedArg = null; - -const initUid = []; -const initHandle = []; -const initProvider = []; -const initParent = []; - -const preUid = []; -const preHandle = []; - -const postUid = []; -const postHandle = []; - -const destroyUid = []; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid.push(uid); - initHandle.push(handle); - initProvider.push(provider); - initParent.push(parent); - }, - pre: function (uid, handle) { - preUid.push(uid); - preHandle.push(handle); - }, - post: function (uid, handle) { - postUid.push(uid); - postHandle.push(handle); - }, - destroy: function (uid) { - destroyUid.push(uid); - } -}); - -asyncHook.enable(); - -Promise - .reject('a') - .then(() => { - fulfilledCalled = true; - }) - .catch(arg => { - rejectedCalled = true; - rejectedArg = arg; - }); - - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid.length, 2, 'both handlers should init'); - assert.equal(preUid.length, 1, 'only the .catch should pre'); - assert.equal(postUid.length, 1, 'only the .catch should post'); - assert.equal(destroyUid.length, 2, 'both handlers should destroy'); - - assert.equal(initUid[0], destroyUid[0]); - - assert.equal(initUid[1], preUid[0]); - assert.equal(initUid[1], postUid[0]); - assert.equal(initUid[1], destroyUid[1]); - assert.equal(initHandle[1], preHandle[0]); - assert.equal(initHandle[1], postHandle[0]); - - for (let i = 0; i < 2; ++i) { - assert.equal(initHandle[i].constructor.name, 'PromiseWrap'); - assert.equal(initParent[i], null); - assert.equal(initProvider[i], 0); - } - - assert.equal(fulfilledCalled, false); - assert.equal(rejectedCalled, true); - assert.equal(rejectedArg, 'a'); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-chained-enabled.js b/node_modules/async-hook-jl/test/test-promise-then-fulfilled-chained-enabled.js deleted file mode 100644 index f04db86..0000000 --- a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-chained-enabled.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let fulfilledCalledA = false; -let fulfilledArgA = null; -let fulfilledCalledB = false; -let fulfilledArgB = null; - -const initUid = []; -const initHandle = []; -const initProvider = []; -const initParent = []; - -const preUid = []; -const preHandle = []; - -const postUid = []; -const postHandle = []; - -const destroyUid = []; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid.push(uid); - initHandle.push(handle); - initProvider.push(provider); - initParent.push(parent); - }, - pre: function (uid, handle) { - preUid.push(uid); - preHandle.push(handle); - }, - post: function (uid, handle) { - postUid.push(uid); - postHandle.push(handle); - }, - destroy: function (uid) { - destroyUid.push(uid); - } -}); - -asyncHook.enable(); - -Promise - .resolve('a') - .then(arg => { - fulfilledCalledA = true; - fulfilledArgA = arg; - return 'b'; - }) - .then(arg => { - fulfilledCalledB = true; - fulfilledArgB = arg; - }); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid.length, 2); - - for (let i = 0; i < 2; ++i) { - assert.equal(initUid[i], preUid[i]); - assert.equal(initUid[i], postUid[i]); - assert.equal(initUid[i], destroyUid[i]); - - assert.equal(initHandle[i], preHandle[i]); - assert.equal(initHandle[i], postHandle[i]); - - assert.equal(initHandle[i].constructor.name, 'PromiseWrap'); - assert.equal(initParent[i], null); - assert.equal(initProvider[i], 0); - } - - assert.equal(fulfilledCalledA, true); - assert.equal(fulfilledArgA, 'a'); - assert.equal(fulfilledCalledB, true); - assert.equal(fulfilledArgB, 'b'); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-enabled.js b/node_modules/async-hook-jl/test/test-promise-then-fulfilled-enabled.js deleted file mode 100644 index fa1f652..0000000 --- a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-enabled.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let fulfilledCalled = false; -let fulfilledArg = null; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; -let postDidThrow = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle, didThrow) { - postUid = uid; - postHandle = handle; - postDidThrow = didThrow; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -Promise - .resolve('a') - .then(arg => { - fulfilledCalled = true; - fulfilledArg = arg; - }); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'PromiseWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(postDidThrow, false); - - assert.equal(fulfilledCalled, true); - assert.equal(fulfilledArg, 'a'); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-multiple-enabled.js b/node_modules/async-hook-jl/test/test-promise-then-fulfilled-multiple-enabled.js deleted file mode 100644 index c62e107..0000000 --- a/node_modules/async-hook-jl/test/test-promise-then-fulfilled-multiple-enabled.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const fulfilledCalled = []; -const fulfilledArg = []; - -const initUid = []; -const initHandle = []; -const initProvider = []; -const initParent = []; - -const preUid = []; -const preHandle = []; - -const postUid = []; -const postHandle = []; - -const destroyUid = []; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid.push(uid); - initHandle.push(handle); - initProvider.push(provider); - initParent.push(parent); - }, - pre: function (uid, handle) { - preUid.push(uid); - preHandle.push(handle); - }, - post: function (uid, handle) { - postUid.push(uid); - postHandle.push(handle); - }, - destroy: function (uid) { - destroyUid.push(uid); - } -}); - -asyncHook.enable(); - -const p = Promise.resolve('a'); - -p.then(arg => { - fulfilledCalled.push(true); - fulfilledArg.push(arg); -}); -p.then(arg => { - fulfilledCalled.push(true); - fulfilledArg.push(arg); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid.length, 2); - - for (let i = 0; i < 2; ++i) { - assert.equal(initUid[i], preUid[i]); - assert.equal(initUid[i], postUid[i]); - assert.equal(initUid[i], destroyUid[i]); - - assert.equal(initHandle[i], preHandle[i]); - assert.equal(initHandle[i], postHandle[i]); - - assert.equal(initHandle[i].constructor.name, 'PromiseWrap'); - assert.equal(initParent[i], null); - assert.equal(initProvider[i], 0); - - assert.equal(fulfilledCalled[i], true); - assert.equal(fulfilledArg[i], 'a'); - } -}); diff --git a/node_modules/async-hook-jl/test/test-promise-then-rejected-enabled.js b/node_modules/async-hook-jl/test/test-promise-then-rejected-enabled.js deleted file mode 100644 index 88157d0..0000000 --- a/node_modules/async-hook-jl/test/test-promise-then-rejected-enabled.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let rejectedCalled = false; -let rejectedArg = null; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle) { - postUid = uid; - postHandle = handle; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -Promise - .reject('a') - .then(null, arg => { - rejectedCalled = true; - rejectedArg = arg; - }); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'PromiseWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(rejectedCalled, true); - assert.equal(rejectedArg, 'a'); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-promise-timing.js b/node_modules/async-hook-jl/test/test-promise-timing.js deleted file mode 100644 index eaede91..0000000 --- a/node_modules/async-hook-jl/test/test-promise-timing.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const eventOrder = []; - -asyncHook.addHooks({ - init: function (uid, handle) { - eventOrder.push(`init#${uid} ${handle.constructor.name}`); - }, - pre: function (uid) { - eventOrder.push(`pre#${uid}`); - }, - post: function (uid) { - eventOrder.push(`post#${uid}`); - }, - destroy: function (uid) { - eventOrder.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); - -new Promise(function (s) { - setTimeout(s, 100); // 1 -}) -.then(function () { - return new Promise((s) => setTimeout(s, 100)); // 4 -}) -.then(); - -process.once('exit', function () { - const nodeMajor = parseInt(process.versions.node.split('.')[0], 10); - - if (nodeMajor >= 6) { - assert.deepEqual(eventOrder, [ - 'init#-1 TimeoutWrap', - 'init#-2 PromiseWrap', - 'init#-3 PromiseWrap', - 'pre#-1', - 'post#-1', - 'destroy#-1', - 'pre#-2', - 'init#-4 TimeoutWrap', - 'post#-2', - 'destroy#-2', - 'init#-5 PromiseWrap', - 'pre#-4', - 'post#-4', - 'destroy#-4', - 'pre#-5', - 'post#-5', - 'destroy#-5', - 'destroy#-3' - ]); - } else { - assert.deepEqual(eventOrder, [ - 'init#-1 TimeoutWrap', - 'init#-2 PromiseWrap', - 'init#-3 PromiseWrap', - 'pre#-1', - 'post#-1', - 'destroy#-1', - 'pre#-2', - 'init#-4 TimeoutWrap', - 'post#-2', - 'destroy#-2', - 'pre#-4', - 'post#-4', - 'destroy#-4', - 'destroy#-3' - ]); - } -}); diff --git a/node_modules/async-hook-jl/test/test-stackfilter-eval.js b/node_modules/async-hook-jl/test/test-stackfilter-eval.js deleted file mode 100644 index 3a05f19..0000000 --- a/node_modules/async-hook-jl/test/test-stackfilter-eval.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; -const assert = require('assert'); - -require('../'); - -let e; -eval('(function() { e = new Error(); })()'); - -assert.equal(e.stack.split('\n').length, 10); diff --git a/node_modules/async-hook-jl/test/test-timeout-clear-in-callback.js b/node_modules/async-hook-jl/test/test-timeout-clear-in-callback.js deleted file mode 100644 index efaf0a2..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-clear-in-callback.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const timings = []; - -asyncHook.addHooks({ - init: function (uid, handle) { - timings.push(`init#${uid} - ${handle.constructor.name}`); - }, - pre: function (uid) { - timings.push(`pre#${uid}`); - }, - post: function (uid) { - timings.push(`post#${uid}`); - }, - destroy: function (uid) { - timings.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); -const timerId = setTimeout(() => { - timings.push('callback'); - clearTimeout(timerId); -}, 100); -asyncHook.disable(); - -process.once('exit', function () { - assert.deepEqual(timings, [ - 'init#-1 - TimeoutWrap', - 'pre#-1', - 'callback', - 'post#-1', - 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-timeout-clear.js b/node_modules/async-hook-jl/test/test-timeout-clear.js deleted file mode 100644 index ce73a58..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-clear.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandleName = ''; -let initParent = {}; -let initProvider = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandleName = handle.constructor.name; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -const timerId = setTimeout(function () { - timerCalled = true; -}); - -clearTimeout(timerId); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, destroyUid); - - assert.equal(initHandleName, 'TimeoutWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(timerCalled, false); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-timeout-didthrow.js b/node_modules/async-hook-jl/test/test-timeout-didthrow.js deleted file mode 100644 index 5098ef8..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-didthrow.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -const eventOrder = []; - -let throwFlag = null; - -asyncHook.addHooks({ - init: function (uid, handle) { - eventOrder.push(`init#${uid} ${handle.constructor.name}`); - }, - pre: function (uid) { - eventOrder.push(`pre#${uid}`); - }, - post: function (uid, handle, didThrow) { - throwFlag = didThrow; - eventOrder.push(`post#${uid}`); - }, - destroy: function (uid) { - eventOrder.push(`destroy#${uid}`); - } -}); - -asyncHook.enable(); - -process.once('uncaughtException', function () { - eventOrder.push('exception'); -}); - -setTimeout(function () { - eventOrder.push('callback'); - throw new Error('error'); -}); - -asyncHook.disable(); - -process.once('exit', function () { - assert.strictEqual(throwFlag, true); - assert.deepEqual(eventOrder, [ - 'init#-1 TimeoutWrap', 'pre#-1', - 'callback', 'exception', - 'post#-1', 'destroy#-1' - ]); -}); diff --git a/node_modules/async-hook-jl/test/test-timeout-disabled.js b/node_modules/async-hook-jl/test/test-timeout-disabled.js deleted file mode 100644 index 84d2e5a..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-disabled.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerACalled = false; -let timerBCalled = false; - -asyncHook.addHooks({ - init: function () { - assert(false); - }, - pre: function () { - assert(false); - }, - post: function () { - assert(false); - }, - destroy: function () { - assert(false); - } -}); - -asyncHook.enable(); -asyncHook.disable(); - -const timerId = setTimeout(function () { - timerACalled = true; -}); - -clearTimeout(timerId); - -setTimeout(function (arg1, arg2) { - timerBCalled = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 0, 'a', 'b'); - -process.once('exit', function () { - assert.equal(timerACalled, false); - assert.equal(timerBCalled, true); -}); diff --git a/node_modules/async-hook-jl/test/test-timeout-enabled.js b/node_modules/async-hook-jl/test/test-timeout-enabled.js deleted file mode 100644 index f2be3cf..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-enabled.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -let timerCalled = false; - -let initCalls = 0; -let destroyCalls = 0; - -let initUid = NaN; -let initHandle = {}; -let initParent = {}; -let initProvider = NaN; - -let preHandle = {}; -let preUid = NaN; - -let postHandle = {}; -let postUid = NaN; - -let destroyUid = NaN; - -asyncHook.addHooks({ - init: function (uid, handle, provider, parent) { - initUid = uid; - initHandle = handle; - initParent = parent; - initProvider = provider; - - initCalls += 1; - }, - pre: function (uid, handle) { - preUid = uid; - preHandle = handle; - }, - post: function (uid, handle) { - postUid = uid; - postHandle = handle; - }, - destroy: function (uid) { - destroyUid = uid; - destroyCalls += 1; - } -}); - -asyncHook.enable(); - -setTimeout(function (arg1, arg2) { - timerCalled = true; - assert.equal(arg1, 'a'); - assert.equal(arg2, 'b'); -}, 0, 'a', 'b'); - -asyncHook.disable(); - -process.once('exit', function () { - assert.equal(initUid, preUid); - assert.equal(initUid, postUid); - assert.equal(initUid, destroyUid); - - assert.equal(initHandle, preHandle); - assert.equal(initHandle, postHandle); - - assert.equal(initHandle.constructor.name, 'TimeoutWrap'); - assert.equal(initParent, null); - assert.equal(initProvider, 0); - - assert.equal(timerCalled, true); - assert.equal(initCalls, 1); - assert.equal(destroyCalls, 1); -}); diff --git a/node_modules/async-hook-jl/test/test-timeout-exception.js b/node_modules/async-hook-jl/test/test-timeout-exception.js deleted file mode 100644 index b2eb0b3..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-exception.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -if (process.env.hasOwnProperty('ASYNC_HOOK_TEST_CHILD')) { - const asyncHook = require('../'); - - asyncHook.enable(); - - setTimeout(function () { - throw new Error('test error'); - }); -} else { - const spawn = require('child_process').spawn; - const endpoint = require('endpoint'); - - const child = spawn(process.execPath, [__filename], { - env: Object.assign({ ASYNC_HOOK_TEST_CHILD: '' }, process.env), - stdio: ['ignore', 1, 'pipe'] - }); - - let stderr = null; - child.stderr.pipe(endpoint(function (err, _stderr) { - if (err) throw err; - stderr = _stderr; - })); - - child.once('close', function (statusCode) { - if (statusCode !== 1 || stderr.toString().indexOf('test error') === -1) { - process.stderr.write(stderr); - process.exit(statusCode); - } - }); -} diff --git a/node_modules/async-hook-jl/test/test-timeout-non-function.js b/node_modules/async-hook-jl/test/test-timeout-non-function.js deleted file mode 100644 index 8696874..0000000 --- a/node_modules/async-hook-jl/test/test-timeout-non-function.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const asyncHook = require('../'); -const assert = require('assert'); - -asyncHook.enable(); - -let throws = false; -try { - setTimeout(undefined, 1); -} catch (e) { - assert.equal(e.message, '"callback" argument must be a function'); - assert.equal(e.name, 'TypeError'); - throws = true; -} - -asyncHook.disable(); - -process.once('exit', function () { - assert(throws); -}); diff --git a/node_modules/async-hook-jl/yarn.lock b/node_modules/async-hook-jl/yarn.lock deleted file mode 100644 index 059859b..0000000 --- a/node_modules/async-hook-jl/yarn.lock +++ /dev/null @@ -1,900 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" - -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - -ajv@^4.7.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ansi-escapes@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-regex@2, ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -async@1.5.x: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -babel-code-frame@^6.16.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" - -cli-color@1.1.x: - version "1.1.0" - resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.1.0.tgz#de188cdc4929d83b67aea04110fbed40fdbf6775" - dependencies: - ansi-regex "2" - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - memoizee "^0.3.9" - timers-ext "0.1" - -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -concat-stream@^1.5.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" - dependencies: - es5-ext "~0.10.2" - -debug@^2.1.1: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -endpoint@0.4.x: - version "0.4.5" - resolved "https://registry.yarnpkg.com/endpoint/-/endpoint-0.4.5.tgz#8a32db66ad94c3161d279ed1ab4ffb6c4101b79a" - dependencies: - inherits "^2.0.1" - -es5-ext@^0.10.14, es5-ext@^0.10.8, es5-ext@^0.10.9, es5-ext@~0.10.11, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.5, es5-ext@~0.10.6: - version "0.10.23" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.23.tgz#7578b51be974207a5487821b56538c224e4e7b38" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-iterator@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-0.1.3.tgz#d6f58b8c4fc413c249b4baa19768f8e4d7c8944e" - dependencies: - d "~0.1.1" - es5-ext "~0.10.5" - es6-symbol "~2.0.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-symbol@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-2.0.1.tgz#761b5c67cfd4f1d18afb234f691d678682cb3bf3" - dependencies: - d "~0.1.1" - es5-ext "~0.10.5" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - -es6-weak-map@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-0.1.4.tgz#706cef9e99aa236ba7766c239c8b9e286ea7d228" - dependencies: - d "~0.1.1" - es5-ext "~0.10.6" - es6-iterator "~0.1.3" - es6-symbol "~2.0.1" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint@^3.4.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" - dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" - doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" - esquery "^1.0.0" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~2.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.4.0: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" - dependencies: - acorn "^5.0.1" - acorn-jsx "^3.0.0" - -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" - dependencies: - estraverse "^4.0.0" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -event-emitter@~0.3.4, event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.14.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -ignore@^3.2.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -interpret@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-my-json-valid@^2.10.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" - dependencies: - path-is-inside "^1.0.1" - -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" - -isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" - -js-yaml@^3.5.1: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" - -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lodash@^4.0.0, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -lru-queue@0.1: - version "0.1.0" - resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" - dependencies: - es5-ext "~0.10.2" - -memoizee@^0.3.9: - version "0.3.10" - resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.3.10.tgz#4eca0d8aed39ec9d017f4c5c2f2f6432f42e5c8f" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-weak-map "~0.1.4" - event-emitter "~0.3.4" - lru-queue "0.1" - next-tick "~0.2.2" - timers-ext "0.1" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -next-tick@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - -next-tick@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-0.2.2.tgz#75da4a927ee5887e39065880065b7336413b310d" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - -readable-stream@^2.2.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.2.tgz#5a04df05e4f57fe3f0dc68fdd11dc5c97c7e6f4d" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.0" - string_decoder "~1.0.0" - util-deprecate "~1.0.1" - -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - -resolve@^1.1.6: - version "1.3.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" - dependencies: - path-parse "^1.0.5" - -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -rimraf@^2.2.8: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" - dependencies: - glob "^7.0.5" - -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" - -safe-buffer@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -shelljs@^0.7.5: - version "0.7.8" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" - -string_decoder@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -timers-ext@0.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.2.tgz#61cc47a76c1abd3195f14527f978d58ae94c5204" - dependencies: - es5-ext "~0.10.14" - next-tick "1" - -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" diff --git a/node_modules/async-listener/.travis.yml b/node_modules/async-listener/.travis.yml deleted file mode 100644 index 136c607..0000000 --- a/node_modules/async-listener/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js - -cache: - directories: - - node_modules - -node_js: - - "9" - - "8" - - "7" - - "7.9.0" - - "6" - - "5" - - "4" - - "3" - - "0.12" - - "0.10" - -matrix: - allow_failures: - - node_js: '7' - -sudo: false diff --git a/node_modules/async-listener/LICENSE b/node_modules/async-listener/LICENSE deleted file mode 100644 index 46a677b..0000000 --- a/node_modules/async-listener/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSD 2-Clause License - -Copyright (c) 2013-2017, Forrest L Norvell -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. - -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/async-listener/README.md b/node_modules/async-listener/README.md deleted file mode 100644 index 21a5a00..0000000 --- a/node_modules/async-listener/README.md +++ /dev/null @@ -1,55 +0,0 @@ -[![NPM](https://nodei.co/npm/async-listener.png?downloads=true&stars=true)](https://nodei.co/npm/async-listener/) - -[![Build status](https://travis-ci.org/othiym23/async-listener.svg?branch=master)](https://travis-ci.org/othiym23/async-listener) - -# process.addAsyncListener polyfill - -This is an implementation of Trevor Norris's -process.{addAsyncListener,removeAsyncListener} API for adding behavior to async -calls. You can see his implementation (currently a work in progress) on -[Node.js core pull request #6011](https://github.com/joyent/node/pull/6011). -This polyfill / shim is intended for use in versions of Node prior to whatever -version of Node in which Trevor's changes finally land (anticipated at the time -of this writing as 0.11.7). - -Here's his documentation of the intended API, which will probably get cleaned up -here later: - -## createAsyncListener(callbacks[, initialStorage]) - -* `callbacks` {Object} -* `initialStorage` {Value} - -Returns a constructed `AsyncListener` object. Which can then be passed to -`process.addAsyncListener()` and `process.removeAsyncListener()`. Each -function parameter is as follows: - -1. `callbacks`: An `Object` which may contain four optional fields: - * `create`: A `function (storage)` that is called when an asynchronous event - is queued. Recives the `storage` attached to the listener. `storage` can be - created by passing an `initialStorage` argument during construction, or by - returning a `Value` from `create` which will be attached to the listener - and overwrite the `initialStorage`. - * `before`: A `function (context, storage)` that is called immediately - before the asynchronous callback is about to run. It will be passed both - the `context` (i.e. `this`) of the calling function and the `storage`. - * `after`: A `function (context, storage)` called immediately after the - asynchronous event's callback is run. Note that if the event's callback - throws during execution this will not be called. - * `error`: A `function (storage, error)` called if the event's callback - threw. If `error` returns `true` then Node will assume the error has been - properly handled and resume execution normally. -1. `initialStorage`: A `Value` (i.e. anything) that will be, by default, - attached to all new event instances. This will be overwritten if a `Value` - is returned by `create()`. - - -## addAsyncListener(callbacks[, initialStorage]) -## addAsyncListener(asyncListener) - -Returns a constructed `AsyncListener` object and immediately adds it to the -listening queue. - -## removeAsyncListener(asyncListener) - -Removes the `asyncListener` from the listening queue. diff --git a/node_modules/async-listener/es6-wrapped-promise.js b/node_modules/async-listener/es6-wrapped-promise.js deleted file mode 100644 index 577b33d..0000000 --- a/node_modules/async-listener/es6-wrapped-promise.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -module.exports = (Promise, ensureAslWrapper) => { - // Updates to this class should also be applied to the the ES3 version - // in index.js. - return class WrappedPromise extends Promise { - constructor(executor) { - var context, args; - super(wrappedExecutor); - var promise = this; - - try { - executor.apply(context, args); - } catch (err) { - args[1](err); - } - - return promise; - function wrappedExecutor(resolve, reject) { - context = this; - args = [wrappedResolve, wrappedReject]; - - // These wrappers create a function that can be passed a function and an argument to - // call as a continuation from the resolve or reject. - function wrappedResolve(val) { - ensureAslWrapper(promise, false); - return resolve(val); - } - - function wrappedReject(val) { - ensureAslWrapper(promise, false); - return reject(val); - } - } - } - } -}; diff --git a/node_modules/async-listener/glue.js b/node_modules/async-listener/glue.js deleted file mode 100644 index 152e513..0000000 --- a/node_modules/async-listener/glue.js +++ /dev/null @@ -1,488 +0,0 @@ -var wrap = require('shimmer').wrap; - -/* - * - * CONSTANTS - * - */ -var HAS_CREATE_AL = 1 << 0; -var HAS_BEFORE_AL = 1 << 1; -var HAS_AFTER_AL = 1 << 2; -var HAS_ERROR_AL = 1 << 3; - -/** - * There is one list of currently active listeners that is mutated in place by - * addAsyncListener and removeAsyncListener. This complicates error-handling, - * for reasons that are discussed below. - */ -var listeners = []; - -/** - * There can be multiple listeners with the same properties, so disambiguate - * them by assigning them an ID at creation time. - */ -var uid = 0; - -/** - * Ensure that errors coming from within listeners are handed off to domains, - * process._fatalException, or uncaughtException without being treated like - * user errors. - */ -var inAsyncTick = false; - -/** - * Because asynchronous contexts can be nested, and errors can come from anywhere - * in the stack, a little extra work is required to keep track of where in the - * nesting we are. Because JS arrays are frequently mutated in place - */ -var listenerStack = []; - -/** - * The error handler on a listener can capture errors thrown during synchronous - * execution immediately after the listener is added. To capture both - * synchronous and asynchronous errors, the error handler just uses the - * "global" list of active listeners, and the rest of the code ensures that the - * listener list is correct by using a stack of listener lists during - * asynchronous execution. - */ -var asyncCatcher; - -/** - * The guts of the system -- called each time an asynchronous event happens - * while one or more listeners are active. - */ -var asyncWrap; - -/** - * Simple helper function that's probably faster than using Array - * filter methods and can be inlined. - */ -function union(dest, added) { - var destLength = dest.length; - var addedLength = added.length; - var returned = []; - - if (destLength === 0 && addedLength === 0) return returned; - - for (var j = 0; j < destLength; j++) returned[j] = dest[j]; - - if (addedLength === 0) return returned; - - for (var i = 0; i < addedLength; i++) { - var missing = true; - for (j = 0; j < destLength; j++) { - if (dest[j].uid === added[i].uid) { - missing = false; - break; - } - } - if (missing) returned.push(added[i]); - } - - return returned; -} - -/* - * For performance, split error-handlers and asyncCatcher up into two separate - * code paths. - */ - -// 0.9+ -if (process._fatalException) { - /** - * Error handlers on listeners can throw, the catcher needs to be able to - * discriminate between exceptions thrown by user code, and exceptions coming - * from within the catcher itself. Use a global to keep track of which state - * the catcher is currently in. - */ - var inErrorTick = false; - - /** - * Throwing always happens synchronously. If the current array of values for - * the current list of asyncListeners is put in a module-scoped variable right - * before a call that can throw, it will always be correct when the error - * handlers are run. - */ - var errorValues; - - asyncCatcher = function asyncCatcher(er) { - var length = listeners.length; - if (inErrorTick || length === 0) return false; - - var handled = false; - - /* - * error handlers - */ - inErrorTick = true; - for (var i = 0; i < length; ++i) { - var listener = listeners[i]; - if ((listener.flags & HAS_ERROR_AL) === 0) continue; - - var value = errorValues && errorValues[listener.uid]; - handled = listener.error(value, er) || handled; - } - inErrorTick = false; - - /* Test whether there are any listener arrays on the stack. In the case of - * synchronous throws when the listener is active, there may have been - * none pushed yet. - */ - if (listenerStack.length > 0) listeners = listenerStack.pop(); - errorValues = undefined; - - return handled && !inAsyncTick; - }; - - asyncWrap = function asyncWrap(original, list, length) { - var values = []; - - /* - * listeners - */ - inAsyncTick = true; - for (var i = 0; i < length; ++i) { - var listener = list[i]; - values[listener.uid] = listener.data; - - if ((listener.flags & HAS_CREATE_AL) === 0) continue; - - var value = listener.create(listener.data); - if (value !== undefined) values[listener.uid] = value; - } - inAsyncTick = false; - - /* One of the main differences between this polyfill and the core - * asyncListener support is that core avoids creating closures by putting a - * lot of the state managemnt on the C++ side of Node (and of course also it - * bakes support for async listeners into the Node C++ API through the - * AsyncWrap class, which means that it doesn't monkeypatch basically every - * async method like this does). - */ - return function () { - // put the current values where the catcher can see them - errorValues = values; - - /* More than one listener can end up inside these closures, so save the - * current listeners on a stack. - */ - listenerStack.push(listeners); - - /* Activate both the listeners that were active when the closure was - * created and the listeners that were previously active. - */ - listeners = union(list, listeners); - - /* - * before handlers - */ - inAsyncTick = true; - for (var i = 0; i < length; ++i) { - if ((list[i].flags & HAS_BEFORE_AL) > 0) { - list[i].before(this, values[list[i].uid]); - } - } - inAsyncTick = false; - - // save the return value to pass to the after callbacks - var returned = original.apply(this, arguments); - - /* - * after handlers (not run if original throws) - */ - inAsyncTick = true; - for (i = 0; i < length; ++i) { - if ((list[i].flags & HAS_AFTER_AL) > 0) { - list[i].after(this, values[list[i].uid]); - } - } - inAsyncTick = false; - - // back to the previous listener list on the stack - listeners = listenerStack.pop(); - errorValues = undefined; - - return returned; - }; - }; - - wrap(process, '_fatalException', function (_fatalException) { - return function _asyncFatalException(er) { - return asyncCatcher(er) || _fatalException(er); - }; - }); -} -// 0.8 and below -else { - /** - * If an error handler in asyncWrap throws, the process must die. Under 0.8 - * and earlier the only way to put a bullet through the head of the process - * is to rethrow from inside the exception handler, so rethrow and set - * errorThrew to tell the uncaughtHandler what to do. - */ - var errorThrew = false; - - /** - * Under Node 0.8, this handler *only* handles synchronously thrown errors. - * This simplifies it, which almost but not quite makes up for the hit taken - * by putting everything in a try-catch. - */ - asyncCatcher = function uncaughtCatcher(er) { - // going down hard - if (errorThrew) throw er; - - var handled = false; - - /* - * error handlers - */ - var length = listeners.length; - for (var i = 0; i < length; ++i) { - var listener = listeners[i]; - if ((listener.flags & HAS_ERROR_AL) === 0) continue; - handled = listener.error(null, er) || handled; - } - - /* Rethrow if one of the before / after handlers fire, which will bring the - * process down immediately. - */ - if (!handled && inAsyncTick) throw er; - }; - - asyncWrap = function asyncWrap(original, list, length) { - var values = []; - - /* - * listeners - */ - inAsyncTick = true; - for (var i = 0; i < length; ++i) { - var listener = list[i]; - values[listener.uid] = listener.data; - - if ((listener.flags & HAS_CREATE_AL) === 0) continue; - - var value = listener.create(listener.data); - if (value !== undefined) values[listener.uid] = value; - } - inAsyncTick = false; - - /* One of the main differences between this polyfill and the core - * asyncListener support is that core avoids creating closures by putting a - * lot of the state managemnt on the C++ side of Node (and of course also it - * bakes support for async listeners into the Node C++ API through the - * AsyncWrap class, which means that it doesn't monkeypatch basically every - * async method like this does). - */ - return function () { - /*jshint maxdepth:4*/ - - // after() handlers don't run if threw - var threw = false; - - // ...unless the error is handled - var handled = false; - - /* More than one listener can end up inside these closures, so save the - * current listeners on a stack. - */ - listenerStack.push(listeners); - - /* Activate both the listeners that were active when the closure was - * created and the listeners that were previously active. - */ - listeners = union(list, listeners); - - /* - * before handlers - */ - inAsyncTick = true; - for (var i = 0; i < length; ++i) { - if ((list[i].flags & HAS_BEFORE_AL) > 0) { - list[i].before(this, values[list[i].uid]); - } - } - inAsyncTick = false; - - // save the return value to pass to the after callbacks - var returned; - try { - returned = original.apply(this, arguments); - } - catch (er) { - threw = true; - for (var i = 0; i < length; ++i) { - if ((listeners[i].flags & HAS_ERROR_AL) == 0) continue; - try { - handled = listeners[i].error(values[list[i].uid], er) || handled; - } - catch (x) { - errorThrew = true; - throw x; - } - } - - if (!handled) { - // having an uncaughtException handler here alters crash semantics - process.removeListener('uncaughtException', asyncCatcher); - process._originalNextTick(function () { - process.addListener('uncaughtException', asyncCatcher); - }); - - throw er; - } - } - finally { - /* - * after handlers (not run if original throws) - */ - if (!threw || handled) { - inAsyncTick = true; - for (i = 0; i < length; ++i) { - if ((list[i].flags & HAS_AFTER_AL) > 0) { - list[i].after(this, values[list[i].uid]); - } - } - inAsyncTick = false; - } - - // back to the previous listener list on the stack - listeners = listenerStack.pop(); - } - - - return returned; - }; - }; - - // will be the first to fire if async-listener is the first module loaded - process.addListener('uncaughtException', asyncCatcher); -} - -// for performance in the case where there are no handlers, just the listener -function simpleWrap(original, list, length) { - inAsyncTick = true; - for (var i = 0; i < length; ++i) { - var listener = list[i]; - if (listener.create) listener.create(listener.data); - } - inAsyncTick = false; - - // still need to make sure nested async calls are made in the context - // of the listeners active at their creation - return function () { - listenerStack.push(listeners); - listeners = union(list, listeners); - - var returned = original.apply(this, arguments); - - listeners = listenerStack.pop(); - - return returned; - }; -} - -/** - * Called each time an asynchronous function that's been monkeypatched in - * index.js is called. If there are no listeners, return the function - * unwrapped. If there are any asyncListeners and any of them have callbacks, - * pass them off to asyncWrap for later use, otherwise just call the listener. - */ -function wrapCallback(original) { - var length = listeners.length; - - // no context to capture, so avoid closure creation - if (length === 0) return original; - - // capture the active listeners as of when the wrapped function was called - var list = listeners.slice(); - - for (var i = 0; i < length; ++i) { - if (list[i].flags > 0) return asyncWrap(original, list, length); - } - - return simpleWrap(original, list, length); -} - -function AsyncListener(callbacks, data) { - if (typeof callbacks.create === 'function') { - this.create = callbacks.create; - this.flags |= HAS_CREATE_AL; - } - - if (typeof callbacks.before === 'function') { - this.before = callbacks.before; - this.flags |= HAS_BEFORE_AL; - } - - if (typeof callbacks.after === 'function') { - this.after = callbacks.after; - this.flags |= HAS_AFTER_AL; - } - - if (typeof callbacks.error === 'function') { - this.error = callbacks.error; - this.flags |= HAS_ERROR_AL; - } - - this.uid = ++uid; - this.data = data === undefined ? null : data; -} -AsyncListener.prototype.create = undefined; -AsyncListener.prototype.before = undefined; -AsyncListener.prototype.after = undefined; -AsyncListener.prototype.error = undefined; -AsyncListener.prototype.data = undefined; -AsyncListener.prototype.uid = 0; -AsyncListener.prototype.flags = 0; - -function createAsyncListener(callbacks, data) { - if (typeof callbacks !== 'object' || !callbacks) { - throw new TypeError('callbacks argument must be an object'); - } - - if (callbacks instanceof AsyncListener) { - return callbacks; - } - else { - return new AsyncListener(callbacks, data); - } -} - -function addAsyncListener(callbacks, data) { - var listener; - if (!(callbacks instanceof AsyncListener)) { - listener = createAsyncListener(callbacks, data); - } - else { - listener = callbacks; - } - - // Make sure the listener isn't already in the list. - var registered = false; - for (var i = 0; i < listeners.length; i++) { - if (listener === listeners[i]) { - registered = true; - break; - } - } - - if (!registered) listeners.push(listener); - - return listener; -} - -function removeAsyncListener(listener) { - for (var i = 0; i < listeners.length; i++) { - if (listener === listeners[i]) { - listeners.splice(i, 1); - break; - } - } -} - -process.createAsyncListener = createAsyncListener; -process.addAsyncListener = addAsyncListener; -process.removeAsyncListener = removeAsyncListener; - -module.exports = wrapCallback; diff --git a/node_modules/async-listener/index.js b/node_modules/async-listener/index.js deleted file mode 100644 index f12e3dd..0000000 --- a/node_modules/async-listener/index.js +++ /dev/null @@ -1,674 +0,0 @@ -'use strict'; - -if (process.addAsyncListener) throw new Error("Don't require polyfill unless needed"); - -var shimmer = require('shimmer') - , semver = require('semver') - , wrap = shimmer.wrap - , massWrap = shimmer.massWrap - , wrapCallback = require('./glue.js') - , util = require('util') - ; - -var v6plus = semver.gte(process.version, '6.0.0'); -var v7plus = semver.gte(process.version, '7.0.0'); -var v8plus = semver.gte(process.version, '8.0.0'); -var v11plus = semver.gte(process.version, '11.0.0'); - -var net = require('net'); - -// From Node.js v7.0.0, net._normalizeConnectArgs have been renamed net._normalizeArgs -if (v7plus && !net._normalizeArgs) { - // a polyfill in our polyfill etc so forth -- taken from node master on 2017/03/09 - net._normalizeArgs = function (args) { - if (args.length === 0) { - return [{}, null]; - } - - var arg0 = args[0]; - var options = {}; - if (typeof arg0 === 'object' && arg0 !== null) { - // (options[...][, cb]) - options = arg0; - } else if (isPipeName(arg0)) { - // (path[...][, cb]) - options.path = arg0; - } else { - // ([port][, host][...][, cb]) - options.port = arg0; - if (args.length > 1 && typeof args[1] === 'string') { - options.host = args[1]; - } - } - - var cb = args[args.length - 1]; - if (typeof cb !== 'function') - return [options, null]; - else - return [options, cb]; - } -} else if (!v7plus && !net._normalizeConnectArgs) { - // a polyfill in our polyfill etc so forth -- taken from node master on 2013/10/30 - net._normalizeConnectArgs = function (args) { - var options = {}; - - function toNumber(x) { return (x = Number(x)) >= 0 ? x : false; } - - if (typeof args[0] === 'object' && args[0] !== null) { - // connect(options, [cb]) - options = args[0]; - } - else if (typeof args[0] === 'string' && toNumber(args[0]) === false) { - // connect(path, [cb]); - options.path = args[0]; - } - else { - // connect(port, [host], [cb]) - options.port = args[0]; - if (typeof args[1] === 'string') { - options.host = args[1]; - } - } - - var cb = args[args.length - 1]; - return typeof cb === 'function' ? [options, cb] : [options]; - }; -} - -// In https://github.com/nodejs/node/pull/11796 `_listen2` was renamed -// `_setUpListenHandle`. It's still aliased as `_listen2`, and currently the -// Node internals still call the alias - but who knows for how long. So better -// make sure we use the new name instead if available. -if ('_setUpListenHandle' in net.Server.prototype) { - wrap(net.Server.prototype, '_setUpListenHandle', wrapSetUpListenHandle); -} else { - wrap(net.Server.prototype, '_listen2', wrapSetUpListenHandle); -} - -function wrapSetUpListenHandle(original) { - return function () { - this.on('connection', function (socket) { - if (socket._handle) { - socket._handle.onread = wrapCallback(socket._handle.onread); - } - }); - - try { - return original.apply(this, arguments); - } - finally { - // the handle will only not be set in cases where there has been an error - if (this._handle && this._handle.onconnection) { - this._handle.onconnection = wrapCallback(this._handle.onconnection); - } - } - }; -} - -function patchOnRead(ctx) { - if (ctx && ctx._handle) { - var handle = ctx._handle; - if (!handle._originalOnread) { - handle._originalOnread = handle.onread; - } - handle.onread = wrapCallback(handle._originalOnread); - } -} - -wrap(net.Socket.prototype, 'connect', function (original) { - return function () { - var args; - // Node core uses an internal Symbol here to guard against the edge-case - // where the user accidentally passes in an array. As we don't have access - // to this Symbol we resort to this hack where we just detect if there is a - // symbol or not. Checking for the number of Symbols is by no means a fool - // proof solution, but it catches the most basic cases. - if (v8plus && - Array.isArray(arguments[0]) && - Object.getOwnPropertySymbols(arguments[0]).length > 0) { - // already normalized - args = arguments[0]; - } else { - // From Node.js v7.0.0, net._normalizeConnectArgs have been renamed net._normalizeArgs - args = v7plus - ? net._normalizeArgs(arguments) - : net._normalizeConnectArgs(arguments); - } - if (args[1]) args[1] = wrapCallback(args[1]); - var result = original.apply(this, args); - patchOnRead(this); - return result; - }; -}); - -var http = require('http'); - -// NOTE: A rewrite occurred in 0.11 that changed the addRequest signature -// from (req, host, port, localAddress) to (req, options) -// Here, I use the longer signature to maintain 0.10 support, even though -// the rest of the arguments aren't actually used -wrap(http.Agent.prototype, 'addRequest', function (original) { - return function (req) { - var onSocket = req.onSocket; - req.onSocket = wrapCallback(function (socket) { - patchOnRead(socket); - return onSocket.apply(this, arguments); - }); - return original.apply(this, arguments); - }; -}); - -var childProcess = require('child_process'); - -function wrapChildProcess(child) { - if (Array.isArray(child.stdio)) { - child.stdio.forEach(function (socket) { - if (socket && socket._handle) { - socket._handle.onread = wrapCallback(socket._handle.onread); - wrap(socket._handle, 'close', activatorFirst); - } - }); - } - - if (child._handle) { - child._handle.onexit = wrapCallback(child._handle.onexit); - } -} - -// iojs v2.0.0+ -if (childProcess.ChildProcess) { - wrap(childProcess.ChildProcess.prototype, 'spawn', function (original) { - return function () { - var result = original.apply(this, arguments); - wrapChildProcess(this); - return result; - }; - }); -} else { - massWrap(childProcess, [ - 'execFile', // exec is implemented in terms of execFile - 'fork', - 'spawn' - ], function (original) { - return function () { - var result = original.apply(this, arguments); - wrapChildProcess(result); - return result; - }; - }); -} - -// need unwrapped nextTick for use within < 0.9 async error handling -if (!process._fatalException) { - process._originalNextTick = process.nextTick; -} - -var processors = []; -if (process._nextDomainTick) processors.push('_nextDomainTick'); -if (process._tickDomainCallback) processors.push('_tickDomainCallback'); - -massWrap( - process, - processors, - activator -); -wrap(process, 'nextTick', activatorFirst); - -var asynchronizers = [ - 'setTimeout', - 'setInterval' -]; -if (global.setImmediate) asynchronizers.push('setImmediate'); - -var timers = require('timers'); -var patchGlobalTimers = global.setTimeout === timers.setTimeout; - -massWrap( - timers, - asynchronizers, - activatorFirst -); - -if (patchGlobalTimers) { - massWrap( - global, - asynchronizers, - activatorFirst - ); -} - -var dns = require('dns'); -massWrap( - dns, - [ - 'lookup', - 'resolve', - 'resolve4', - 'resolve6', - 'resolveCname', - 'resolveMx', - 'resolveNs', - 'resolveTxt', - 'resolveSrv', - 'reverse' - ], - activator -); - -if (dns.resolveNaptr) wrap(dns, 'resolveNaptr', activator); - -var fs = require('fs'); -massWrap( - fs, - [ - 'watch', - 'rename', - 'truncate', - 'chown', - 'fchown', - 'chmod', - 'fchmod', - 'stat', - 'lstat', - 'fstat', - 'link', - 'symlink', - 'readlink', - 'realpath', - 'unlink', - 'rmdir', - 'mkdir', - 'readdir', - 'close', - 'open', - 'utimes', - 'futimes', - 'fsync', - 'write', - 'read', - 'readFile', - 'writeFile', - 'appendFile', - 'watchFile', - 'unwatchFile', - "exists", - ], - activator -); - -// only wrap lchown and lchmod on systems that have them. -if (fs.lchown) wrap(fs, 'lchown', activator); -if (fs.lchmod) wrap(fs, 'lchmod', activator); - -// only wrap ftruncate in versions of node that have it -if (fs.ftruncate) wrap(fs, 'ftruncate', activator); - -// Wrap zlib streams -var zlib; -try { zlib = require('zlib'); } catch (err) { } -if (zlib && zlib.Deflate && zlib.Deflate.prototype) { - var proto = Object.getPrototypeOf(zlib.Deflate.prototype); - if (proto._transform) { - // streams2 - wrap(proto, "_transform", activator); - } - else if (proto.write && proto.flush && proto.end) { - // plain ol' streams - massWrap( - proto, - [ - 'write', - 'flush', - 'end' - ], - activator - ); - } -} - -// Wrap Crypto -var crypto; -try { crypto = require('crypto'); } catch (err) { } -if (crypto) { - - var toWrap = [ - 'pbkdf2', - 'randomBytes', - ]; - if (!v11plus) { - toWrap.push('pseudoRandomBytes'); - } - - massWrap(crypto, toWrap, activator); -} - -// It is unlikely that any userspace promise implementations have a native -// implementation of both Promise and Promise.toString. -var instrumentPromise = !!global.Promise && - Promise.toString() === 'function Promise() { [native code] }' && - Promise.toString.toString() === 'function toString() { [native code] }'; - -// Check that global Promise is native -if (instrumentPromise) { - // shoult not use any methods that have already been wrapped - var promiseListener = process.addAsyncListener({ - create: function create() { - instrumentPromise = false; - } - }); - - // should not resolve synchronously - global.Promise.resolve(true).then(function notSync() { - instrumentPromise = false; - }); - - process.removeAsyncListener(promiseListener); -} - -/* - * Native promises use the microtask queue to make all callbacks run - * asynchronously to avoid Zalgo issues. Since the microtask queue is not - * exposed externally, promises need to be modified in a fairly invasive and - * complex way. - * - * The async boundary in promises that must be patched is between the - * fulfillment of the promise and the execution of any callback that is waiting - * for that fulfillment to happen. This means that we need to trigger a create - * when resolve or reject is called and trigger before, after and error handlers - * around the callback execution. There may be multiple callbacks for each - * fulfilled promise, so handlers will behave similar to setInterval where - * there may be multiple before after and error calls for each create call. - * - * async-listener monkeypatching has one basic entry point: `wrapCallback`. - * `wrapCallback` should be called when create should be triggered and be - * passed a function to wrap, which will execute the body of the async work. - * The resolve and reject calls can be modified fairly easily to call - * `wrapCallback`, but at the time of resolve and reject all the work to be done - * on fulfillment may not be defined, since a call to then, chain or fetch can - * be made even after the promise has been fulfilled. To get around this, we - * create a placeholder function which will call a function passed into it, - * since the call to the main work is being made from within the wrapped - * function, async-listener will work correctly. - * - * There is another complication with monkeypatching Promises. Calls to then, - * chain and catch each create new Promises that are fulfilled internally in - * different ways depending on the return value of the callback. When the - * callback return a Promise, the new Promise is resolved asynchronously after - * the returned Promise has been also been resolved. When something other than - * a promise is resolved the resolve call for the new Promise is put in the - * microtask queue and asynchronously resolved. - * - * Then must be wrapped so that its returned promise has a wrapper that can be - * used to invoke further continuations. This wrapper cannot be created until - * after the callback has run, since the callback may return either a promise - * or another value. Fortunately we already have a wrapper function around the - * callback we can use (the wrapper created by resolve or reject). - * - * By adding an additional argument to this wrapper, we can pass in the - * returned promise so it can have its own wrapper appended. the wrapper - * function can the call the callback, and take action based on the return - * value. If a promise is returned, the new Promise can proxy the returned - * Promise's wrapper (this wrapper may not exist yet, but will by the time the - * wrapper needs to be invoked). Otherwise, a new wrapper can be create the - * same way as in resolve and reject. Since this wrapper is created - * synchronously within another wrapper, it will properly appear as a - * continuation from within the callback. - */ - -if (instrumentPromise) { - wrapPromise(); -} - -function wrapPromise() { - var Promise = global.Promise; - - // Updates to this class should also be applied to the the ES6 version - // in es6-wrapped-promise.js. - function wrappedPromise(executor) { - if (!(this instanceof wrappedPromise)) { - return Promise(executor); - } - - if (typeof executor !== 'function') { - return new Promise(executor); - } - - var context, args; - var promise = new Promise(wrappedExecutor); - promise.__proto__ = wrappedPromise.prototype; - - try { - executor.apply(context, args); - } catch (err) { - args[1](err); - } - - return promise; - - function wrappedExecutor(resolve, reject) { - context = this; - args = [wrappedResolve, wrappedReject]; - - // These wrappers create a function that can be passed a function and an argument to - // call as a continuation from the resolve or reject. - function wrappedResolve(val) { - ensureAslWrapper(promise, false); - return resolve(val); - } - - function wrappedReject(val) { - ensureAslWrapper(promise, false); - return reject(val); - } - } - } - - util.inherits(wrappedPromise, Promise); - - wrap(Promise.prototype, 'then', wrapThen); - // Node.js = 0 ? x : false; -} - -// taken from node master on 2017/03/09 -function isPipeName(s) { - return typeof s === 'string' && toNumber(s) === false; -} diff --git a/node_modules/async-listener/package.json b/node_modules/async-listener/package.json deleted file mode 100644 index 3381e24..0000000 --- a/node_modules/async-listener/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "async-listener@0.6.10", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_from": "async-listener@0.6.10", - "_id": "async-listener@0.6.10", - "_inBundle": false, - "_integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==", - "_location": "/async-listener", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "async-listener@0.6.10", - "name": "async-listener", - "escapedName": "async-listener", - "rawSpec": "0.6.10", - "saveSpec": null, - "fetchSpec": "0.6.10" - }, - "_requiredBy": [ - "/continuation-local-storage" - ], - "_resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz", - "_spec": "0.6.10", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "Forrest L Norvell", - "email": "ogd@aoaioxxysz.net" - }, - "bugs": { - "url": "https://github.com/othiym23/async-listener/issues" - }, - "contributors": [ - { - "name": "Tim Caswell", - "email": "tim@creationix.com" - }, - { - "name": "Forrest L Norvell", - "email": "ogd@aoaioxxysz.net" - } - ], - "dependencies": { - "semver": "^5.3.0", - "shimmer": "^1.1.0" - }, - "description": "Polyfill exporting trevnorris's 0.11+ asyncListener API.", - "devDependencies": { - "tap": "^0.7.1" - }, - "engines": { - "node": "<=0.11.8 || >0.11.10" - }, - "homepage": "https://github.com/othiym23/async-listener#readme", - "keywords": [ - "polyfill", - "shim", - "zesty", - "crazed", - "experimental" - ], - "license": "BSD-2-Clause", - "main": "index.js", - "name": "async-listener", - "repository": { - "type": "git", - "url": "git+https://github.com/othiym23/async-listener.git" - }, - "scripts": { - "test": "tap test/*.tap.js" - }, - "version": "0.6.10" -} diff --git a/node_modules/async-listener/test/add-remove.tap.js b/node_modules/async-listener/test/add-remove.tap.js deleted file mode 100644 index 7e5efa6..0000000 --- a/node_modules/async-listener/test/add-remove.tap.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -var test = require('tap').test; - -test("async listener lifecycle", function (t) { - t.plan(8); - - if (!process.addAsyncListener) require('../index.js'); - - t.ok(process.createAsyncListener, "can create async listeners"); - var counted = 0; - var listener = process.createAsyncListener( - { - create : function () { counted++; }, - before : function () {}, - after : function () {}, - error : function () {} - }, - Object.create(null) - ); - - t.ok(process.addAsyncListener, "can add async listeners"); - t.doesNotThrow(function () { - listener = process.addAsyncListener(listener); - }, "adding does not throw"); - - t.ok(listener, "have a listener we can later remove"); - - t.ok(process.removeAsyncListener, "can remove async listeners"); - t.doesNotThrow(function () { - process.removeAsyncListener(listener); - }, "removing does not throw"); - - t.doesNotThrow(function () { - process.removeAsyncListener(listener); - }, "failing remove does not throw"); - - t.equal(counted, 0, "didn't hit any async functions"); -}); diff --git a/node_modules/async-listener/test/connection-handler-disconnects.tap.js b/node_modules/async-listener/test/connection-handler-disconnects.tap.js deleted file mode 100644 index 4eb94ef..0000000 --- a/node_modules/async-listener/test/connection-handler-disconnects.tap.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -var net = require('net'); -var test = require('tap').test; -if (!process.addAsyncListener) require('../index.js'); - -var PORT = 12346; - -test("another connection handler disconnects server", function (t) { - t.plan(7); - - var client; - - // This tests that we don't crash when another connection listener - // destroys the socket handle before we try to wrap - // socket._handle.onread . - // In this case, the connection handler declared below will run first, - // because the wrapping event handler doesn't get added until - // the server listens below. - - var server = net.createServer(function() {}); - server.on( - 'connection', - function (socket) { - t.ok(true, 'Reached second connection event'); - socket.destroy(); - t.ok(! socket._handle, 'Destroy removed the socket handle'); - } - ); - - server.on('error', function (err) { - t.fail(true, 'It should not produce errors'); - }); - - server.on( - 'listening', - function () { - t.ok(true, 'Server listened ok'); - - // This will run both 'connection' handlers, with the one above - // running first. - // This should succeed even though the socket is destroyed. - client = net.connect(PORT); - client.on( - 'connect', - function () { - t.ok(true, 'connected ok'); - } - ); - - client.on( - 'close', - function () { - t.ok(true, 'disconnected ok'); - t.ok( - !client._handle, - 'close removed the client handle' - ); - - server.close(function () { - t.ok( - !server._handle, - 'Destroy removed the server handle' - ); - }); - } - ) - } - ); - - // Another 'connection' handler is registered during this call. - server.listen(PORT); - -}); diff --git a/node_modules/async-listener/test/core-asynclistener-error-multiple-handled.simple.js b/node_modules/async-listener/test/core-asynclistener-error-multiple-handled.simple.js deleted file mode 100644 index 50493da..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-multiple-handled.simple.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -var active = null; -var cntr = 0; - -function onAsync0() { - return 0; -} - -function onAsync1() { - return 1; -} - -function onError(stor) { - results.push(stor); - return true; -} - -var results = []; -var asyncNoHandleError0 = { - create: onAsync0, - error: onError -}; -var asyncNoHandleError1 = { - create: onAsync1, - error: onError -}; - -var listeners = [ - process.addAsyncListener(asyncNoHandleError0), - process.addAsyncListener(asyncNoHandleError1) -]; - -process.nextTick(function() { - throw new Error(); -}); - -process.removeAsyncListener(listeners[0]); -process.removeAsyncListener(listeners[1]); - -process.on('exit', function(code) { - // If the exit code isn't ok then return early to throw the stack that - // caused the bad return code. - if (code !== 0) - return; - - // Handling of errors should propagate to all listeners. - assert.equal(results[0], 0); - assert.equal(results[1], 1); - assert.equal(results.length, 2); - - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-error-multiple-mix.simple.js b/node_modules/async-listener/test/core-asynclistener-error-multiple-mix.simple.js deleted file mode 100644 index da37601..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-multiple-mix.simple.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -var results = []; -var asyncNoHandleError = { - error: function(stor) { - results.push(1); - } -}; - -var asyncHandleError = { - error: function(stor) { - results.push(0); - return true; - } -}; - -var listeners = [ - process.addAsyncListener(asyncHandleError), - process.addAsyncListener(asyncNoHandleError) -]; - -// Even if an error handler returns true, both should fire. -process.nextTick(function() { - throw new Error(); -}); - -process.removeAsyncListener(listeners[0]); -process.removeAsyncListener(listeners[1]); - -process.on('exit', function(code) { - // If the exit code isn't ok then return early to throw the stack that - // caused the bad return code. - if (code !== 0) - return; - - // Mixed handling of errors should propagate to all listeners. - assert.equal(results[0], 0); - assert.equal(results[1], 1); - assert.equal(results.length, 2); - - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-error-multiple-unhandled.simple.js b/node_modules/async-listener/test/core-asynclistener-error-multiple-unhandled.simple.js deleted file mode 100644 index 950b6f7..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-multiple-unhandled.simple.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); - -var assert = require('assert'); - -function onAsync0() { - return 0; -} - -function onAsync1() { - return 1; -} - -function onError(stor) { - results.push(stor); -} - -var results = []; -var asyncNoHandleError0 = { - create: onAsync0, - error: onError -}; -var asyncNoHandleError1 = { - create: onAsync1, - error: onError -}; - -var listeners = [ - process.addAsyncListener(asyncNoHandleError0), - process.addAsyncListener(asyncNoHandleError1) -]; - -var uncaughtFired = false; -process.on('uncaughtException', function() { - uncaughtFired = true; - - // Unhandled errors should propagate to all listeners. - assert.equal(results[0], 0); - assert.equal(results[1], 1); - assert.equal(results.length, 2); -}); - -process.nextTick(function() { - throw new Error(); -}); - -process.on('exit', function(code) { - // If the exit code isn't ok then return early to throw the stack that - // caused the bad return code. - if (code !== 0) - return; - - // Need to remove the async listeners or tests will always pass - for (var i = 0; i < listeners.length; i++) - process.removeAsyncListener(listeners[i]); - - assert.ok(uncaughtFired); - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-error-net.simple.js b/node_modules/async-listener/test/core-asynclistener-error-net.simple.js deleted file mode 100644 index 21fddc3..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-net.simple.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - -var PORT = 12346; - -if (!process.addAsyncListener) require('../index.js'); - -var assert = require('assert'); -var dns = require('dns'); -var fs = require('fs'); -var net = require('net'); - -var errorMsgs = []; -var caught = 0; -var expectCaught = 0; - -var callbacksObj = { - error: function(value, er) { - var idx = errorMsgs.indexOf(er.message); - caught++; - - // process._rawDebug('Handling error: ' + er.message); - - if (-1 < idx) - errorMsgs.splice(idx, 1); - else - throw new Error('Message not found: ' + er.message); - - return true; - } -}; - -var listener = process.addAsyncListener(callbacksObj); - -process.on('exit', function(code) { - process.removeAsyncListener(listener); - - if (code > 0) - return; - - if (errorMsgs.length > 0) - throw new Error('Errors not fired: ' + errorMsgs); - - assert.equal(caught, expectCaught); - console.log('ok'); -}); - - -// Net -var iter = 3; -for (var i = 0; i < iter; i++) { - errorMsgs.push('net - error: server connection'); - errorMsgs.push('net - error: client data'); - errorMsgs.push('net - error: server data'); -} -errorMsgs.push('net - error: server closed'); - -var server = net.createServer(function(c) { - c.on('data', function() { - if (0 === --iter) { - server.close(function() { - console.log('net - server closing'); - throw new Error('net - error: server closed'); - }); - expectCaught++; - } - console.log('net - connection received data'); - throw new Error('net - error: server data'); - }); - expectCaught++; - - c.end('bye'); - console.log('net - connection received'); - throw new Error('net - error: server connection'); -}); -expectCaught += iter; - -server.listen(PORT, function() { - for (var i = 0; i < iter; i++) - clientConnect(); -}); - -function clientConnect() { - var client = net.connect(PORT, function() { }); - - client.on('data', function() { - client.end('see ya'); - console.log('net - client received data'); - throw new Error('net - error: client data'); - }); - expectCaught++; -} diff --git a/node_modules/async-listener/test/core-asynclistener-error-throw-in-after.simple.js b/node_modules/async-listener/test/core-asynclistener-error-throw-in-after.simple.js deleted file mode 100644 index 03a89fc..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-throw-in-after.simple.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -var once = 0; -function onAsync0() {} - -var handlers = { - after: function () { - throw new Error('erk'); - }, - error: function () { - // error handler must be called exactly *once* - once++; - - return true; - } -}; - -var key = process.addAsyncListener(onAsync0, handlers); - -process.on('uncaughtException', function () { - // process should propagate error regardless of - // error handlers return value - assert.equal(once, 1); - console.log('ok'); -}); - -setImmediate(function () { - return 1; -}); - -process.removeAsyncListener(key); diff --git a/node_modules/async-listener/test/core-asynclistener-error-throw-in-before-multiple.simple.js b/node_modules/async-listener/test/core-asynclistener-error-throw-in-before-multiple.simple.js deleted file mode 100644 index 622a4d9..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-throw-in-before-multiple.simple.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -var once = 0; -function onAsync0() {} -function onAsync1() {} - -var handlers = { - before : function () { - throw 1; - }, - error : function (stor, err) { - // must catch error thrown in before - assert.equal(err, 1); - - once++; - - return true; - } -}; - -var handlers1 = { - before : function () { - throw 2; - }, - error : function (stor, err) { - // must catch *other* handler's throw error - assert.equal(err, 1); - - once++; - - return true; - } -}; - -var keys = [ - process.addAsyncListener(onAsync0, handlers), - process.addAsyncListener(onAsync1, handlers1) -]; - -process.on('uncaughtException', function () { - // both error handlers must fire - assert.equal(once, 2); - - console.log('ok'); -}); - -setImmediate(function () { - return 1; -}); - -keys.forEach(function (key) { - process.removeAsyncListener(key); -}); - diff --git a/node_modules/async-listener/test/core-asynclistener-error-throw-in-before.simple.js b/node_modules/async-listener/test/core-asynclistener-error-throw-in-before.simple.js deleted file mode 100644 index f6a3c65..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-throw-in-before.simple.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -var once = 0; -function onAsync0() {} - -var handlers = { - before : function () { - throw 1; - }, - error : function () { - // error handler must be called exactly *once* - once++; - - return true; - } -}; - -var key = process.addAsyncListener(onAsync0, handlers); - -process.on('uncaughtException', function () { - // process should propagate error regardless of - // error handlers return value - assert.equal(once, 1); - console.log('ok'); -}); - -setImmediate(function () { - return 1; -}); - -process.removeAsyncListener(key); diff --git a/node_modules/async-listener/test/core-asynclistener-error-throw-in-error.simple.js b/node_modules/async-listener/test/core-asynclistener-error-throw-in-error.simple.js deleted file mode 100644 index cec06a3..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error-throw-in-error.simple.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); -var cluster = require('cluster'); - -function onAsync0() {} - -if (cluster.isMaster) { - cluster.setupMaster({ - silent : true - }); - cluster.fork(); - cluster.on('exit', function (worker, code) { - if (process._fatalException) { - // verify child exited because of throw from 'error' - assert.equal(code, 7); - } - else { - // node < 0.9.x doesn't have error exit codes - assert.equal(code, 1); - } - - console.log('ok'); - }); -} else { - var once = 0; - - var handlers = { - error : function () { - // the error handler should not be called again - if (once++ !== 0) process.exit(5); - - throw new Error('error handler'); - } - }; - - var key = process.addAsyncListener(onAsync0, handlers); - - process.on('unhandledException', function () { - // throwing in 'error' should bypass unhandledException - process.exit(1); - }); - - setImmediate(function () { - throw new Error('setImmediate'); - }); - - process.removeAsyncListener(key); -} diff --git a/node_modules/async-listener/test/core-asynclistener-error.simple.js b/node_modules/async-listener/test/core-asynclistener-error.simple.js deleted file mode 100644 index 97d3b58..0000000 --- a/node_modules/async-listener/test/core-asynclistener-error.simple.js +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - -var PORT = 12346; - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); -var dns = require('dns'); -var fs = require('fs'); -var net = require('net'); -var addListener = process.addAsyncListener; -var removeListener = process.removeAsyncListener; - -var caught = 0; -var expectCaught = 0; - -function asyncL() { } - -var callbacksObj = { - error: function(domain, er) { - caught++; - - switch (er.message) { - case 'sync throw': - case 'setTimeout - simple': - case 'setImmediate - simple': - case 'setInterval - simple': - case 'process.nextTick - simple': - case 'setTimeout - nested': - case 'process.nextTick - nested': - case 'setImmediate - nested': - case 'setTimeout2 - nested': - case 'setInterval - nested': - case 'fs - file does not exist': - case 'fs - nested file does not exist': - case 'fs - exists': - case 'fs - realpath': - case 'net - connection listener': - case 'net - server listening': - case 'net - client connect': - case 'dns - lookup': - return true; - - default: - return false; - } - } -}; - -process.on('exit', function() { - console.log('caught:', caught); - console.log('expected:', expectCaught); - assert.equal(caught, expectCaught, 'caught all expected errors'); - console.log('ok'); -}); - -var listener = process.createAsyncListener(asyncL, callbacksObj); - - -// Catch synchronous throws -process.nextTick(function() { - addListener(listener); - - expectCaught++; - throw new Error('sync throw'); - - removeListener(listener); -}); - - -// Simple cases -process.nextTick(function() { - addListener(listener); - - setTimeout(function() { - throw new Error('setTimeout - simple'); - }); - expectCaught++; - - setImmediate(function() { - throw new Error('setImmediate - simple'); - }); - expectCaught++; - - var b = setInterval(function() { - clearInterval(b); - throw new Error('setInterval - simple'); - }); - expectCaught++; - - process.nextTick(function() { - throw new Error('process.nextTick - simple'); - }); - expectCaught++; - - removeListener(listener); -}); - - -// Deeply nested -process.nextTick(function() { - addListener(listener); - - setTimeout(function() { - process.nextTick(function() { - setImmediate(function() { - var b = setInterval(function() { - clearInterval(b); - throw new Error('setInterval - nested'); - }); - expectCaught++; - throw new Error('setImmediate - nested'); - }); - expectCaught++; - throw new Error('process.nextTick - nested'); - }); - expectCaught++; - setTimeout(function() { - throw new Error('setTimeout2 - nested'); - }); - expectCaught++; - throw new Error('setTimeout - nested'); - }); - expectCaught++; - - removeListener(listener); -}); - - -// FS -process.nextTick(function() { - addListener(listener); - - fs.stat('does not exist', function() { - throw new Error('fs - file does not exist'); - }); - expectCaught++; - - fs.exists('hi all', function() { - throw new Error('fs - exists'); - }); - expectCaught++; - - fs.realpath('/some/path', function() { - throw new Error('fs - realpath'); - }); - expectCaught++; - - removeListener(listener); -}); - - -// Nested FS -process.nextTick(function() { - addListener(listener); - - setTimeout(function() { - setImmediate(function() { - var b = setInterval(function() { - clearInterval(b); - process.nextTick(function() { - fs.stat('does not exist', function() { - throw new Error('fs - nested file does not exist'); - }); - expectCaught++; - }); - }); - }); - }); - - removeListener(listener); -}); - - -// Net -process.nextTick(function() { - addListener(listener); - - var server = net.createServer(function() { - server.close(); - throw new Error('net - connection listener'); - }); - expectCaught++; - - server.listen(PORT, function() { - var client = net.connect(PORT, function() { - client.end(); - throw new Error('net - client connect'); - }); - expectCaught++; - throw new Error('net - server listening'); - }); - expectCaught++; - - removeListener(listener); -}); - - -// DNS -process.nextTick(function() { - addListener(listener); - - dns.lookup('localhost', function() { - throw new Error('dns - lookup'); - }); - expectCaught++; - - removeListener(listener); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-nexttick-remove.simple.js b/node_modules/async-listener/test/core-asynclistener-nexttick-remove.simple.js deleted file mode 100644 index 07f080d..0000000 --- a/node_modules/async-listener/test/core-asynclistener-nexttick-remove.simple.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); - -var assert = require('assert'); -var net = require('net'); -var fs = require('fs'); - -var actualAsync = 0; -var expectAsync = 0; - - -process.on('exit', function() { - console.log('expected', expectAsync); - console.log('actual ', actualAsync); - assert.equal(expectAsync, actualAsync); - console.log('ok'); -}); - - -// --- Begin Testing --- // - -function onAsync() { - actualAsync++; -} - - -var id; -process.nextTick(function() { - process.removeAsyncListener(id); -}); -id = process.addAsyncListener(onAsync); - - -// Test listeners side-by-side -var b = setInterval(function() { - clearInterval(b); -}); -expectAsync++; - -var c = setInterval(function() { - clearInterval(c); -}); -expectAsync++; - -setTimeout(function() { }); -expectAsync++; - -setTimeout(function() { }); -expectAsync++; - -process.nextTick(function() { }); -expectAsync++; - -process.nextTick(function() { }); -expectAsync++; - -setImmediate(function() { }); -expectAsync++; - -setImmediate(function() { }); -expectAsync++; - -setTimeout(function() { }, 100); -expectAsync++; - -setTimeout(function() { }, 100); -expectAsync++; - - -// Async listeners should propagate with nested callbacks -var interval = 3; - -process.nextTick(function() { - setTimeout(function() { - setImmediate(function() { - var i = setInterval(function() { - if (--interval <= 0) - clearInterval(i); - }); - expectAsync++; - }); - expectAsync++; - process.nextTick(function() { - setImmediate(function() { - setTimeout(function() { }, 200); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; -}); -expectAsync++; - - -// Test callbacks from fs I/O -fs.stat('something random', function() { }); -expectAsync++; - -setImmediate(function() { - fs.stat('random again', function() { }); - expectAsync++; -}); -expectAsync++; - - -// Test net I/O -var server = net.createServer(function() { }); -expectAsync++; - -server.listen(8080, function() { - server.close(); - expectAsync++; -}); -expectAsync++; diff --git a/node_modules/async-listener/test/core-asynclistener-only-add.simple.js b/node_modules/async-listener/test/core-asynclistener-only-add.simple.js deleted file mode 100644 index daa1531..0000000 --- a/node_modules/async-listener/test/core-asynclistener-only-add.simple.js +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); - -var assert = require('assert'); -var net = require('net'); -var fs = require('fs'); - -var actualAsync = 0; -var expectAsync = 0; - - -process.on('exit', function() { - console.log('expected', expectAsync); - console.log('actual ', actualAsync); - assert.equal(expectAsync, actualAsync); - console.log('ok'); -}); - - -// --- Begin Testing --- // - -function onAsync() { - actualAsync++; -} - - -process.addAsyncListener(onAsync); - - -// Test listeners side-by-side -var b = setInterval(function() { - clearInterval(b); -}); -expectAsync++; - -var c = setInterval(function() { - clearInterval(c); -}); -expectAsync++; - -setTimeout(function() { }); -expectAsync++; - -setTimeout(function() { }); -expectAsync++; - -process.nextTick(function() { }); -expectAsync++; - -process.nextTick(function() { }); -expectAsync++; - -setImmediate(function() { }); -expectAsync++; - -setImmediate(function() { }); -expectAsync++; - -setTimeout(function() { }, 100); -expectAsync++; - -setTimeout(function() { }, 100); -expectAsync++; - - -// Async listeners should propagate with nested callbacks -var interval = 3; - -process.nextTick(function() { - setTimeout(function() { - setImmediate(function() { - var i = setInterval(function() { - if (--interval <= 0) - clearInterval(i); - }); - expectAsync++; - }); - expectAsync++; - process.nextTick(function() { - setImmediate(function() { - setTimeout(function() { }, 200); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; -}); -expectAsync++; - - -// Test callbacks from fs I/O -fs.stat('something random', function() { }); -expectAsync++; - -setImmediate(function() { - fs.stat('random again', function() { }); - expectAsync++; -}); -expectAsync++; - - -// Test net I/O -var server = net.createServer(function() { }); -expectAsync++; - -server.listen(8080, function() { - server.close(); - expectAsync++; -}); -expectAsync++; diff --git a/node_modules/async-listener/test/core-asynclistener-remove-before.simple.js b/node_modules/async-listener/test/core-asynclistener-remove-before.simple.js deleted file mode 100644 index e7aa095..0000000 --- a/node_modules/async-listener/test/core-asynclistener-remove-before.simple.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -function onAsync0() { - return 0; -} - -var set = 0; -var asyncNoHandleError = { - before : function () { - set ++; - }, - after : function () { - set ++; - } -}; - -var key = process.addAsyncListener(onAsync0, asyncNoHandleError); - -process.removeAsyncListener(key); - -setImmediate(function () { - return 1; -}); - -process.on('exit', function () { - // the async handler should never be called - assert.equal(set, 0); - - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-remove-inflight-error.simple.js b/node_modules/async-listener/test/core-asynclistener-remove-inflight-error.simple.js deleted file mode 100644 index 5703069..0000000 --- a/node_modules/async-listener/test/core-asynclistener-remove-inflight-error.simple.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -function onAsync0() {} - -var set = 0; -var asyncNoHandleError = { - error : function () { - set ++; - } -}; - -var key = process.addAsyncListener(onAsync0, asyncNoHandleError); - -setImmediate(function () { - throw 1; -}); - -process.removeAsyncListener(key); -process.on('uncaughtException', function () { - // throwing should call the error handler once, - // then propagate to the uncaughtException - assert.equal(set, 1); - - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener-remove-inflight.simple.js b/node_modules/async-listener/test/core-asynclistener-remove-inflight.simple.js deleted file mode 100644 index 3402aad..0000000 --- a/node_modules/async-listener/test/core-asynclistener-remove-inflight.simple.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); - -function onAsync0() {} - -var set = 0; -var asyncNoHandleError = { - before : function () { - set++; - }, - after : function () { - set++; - } -}; - -var key = process.addAsyncListener(onAsync0, asyncNoHandleError); - -setImmediate(function () { - return 1; -}); - -process.removeAsyncListener(key); -process.on('exit', function () { - // calling removeAsyncListener *after* a callback is scheduled - // should not affect the handler from responding to the callback - assert.equal(set, 2); - - console.log('ok'); -}); diff --git a/node_modules/async-listener/test/core-asynclistener.simple.js b/node_modules/async-listener/test/core-asynclistener.simple.js deleted file mode 100644 index 3002bb1..0000000 --- a/node_modules/async-listener/test/core-asynclistener.simple.js +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - -var PORT = 12346; - -if (!process.addAsyncListener) require('../index.js'); -if (!global.setImmediate) global.setImmediate = setTimeout; - -var assert = require('assert'); -var net = require('net'); -var fs = require('fs'); -var dgram = require('dgram'); - -var addListener = process.addAsyncListener; -var removeListener = process.removeAsyncListener; -var actualAsync = 0; -var expectAsync = 0; - -var callbacks = { - create: function onAsync() { - actualAsync++; - } -}; - -var listener = process.createAsyncListener(callbacks); - -process.on('exit', function() { - console.log('expected', expectAsync); - console.log('actual ', actualAsync); - // TODO(trevnorris): Not a great test. If one was missed, but others - // overflowed then the test would still pass. - assert.ok(actualAsync >= expectAsync); -}); - - -// Test listeners side-by-side -process.nextTick(function() { - addListener(listener); - - var b = setInterval(function() { - clearInterval(b); - }); - expectAsync++; - - var c = setInterval(function() { - clearInterval(c); - }); - expectAsync++; - - setTimeout(function() { }); - expectAsync++; - - setTimeout(function() { }); - expectAsync++; - - process.nextTick(function() { }); - expectAsync++; - - process.nextTick(function() { }); - expectAsync++; - - setImmediate(function() { }); - expectAsync++; - - setImmediate(function() { }); - expectAsync++; - - setTimeout(function() { }, 10); - expectAsync++; - - setTimeout(function() { }, 10); - expectAsync++; - - removeListener(listener); -}); - - -// Async listeners should propagate with nested callbacks -process.nextTick(function() { - addListener(listener); - var interval = 3; - - process.nextTick(function() { - setTimeout(function() { - setImmediate(function() { - var i = setInterval(function() { - if (--interval <= 0) - clearInterval(i); - }); - expectAsync++; - }); - expectAsync++; - process.nextTick(function() { - setImmediate(function() { - setTimeout(function() { }, 20); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; - }); - expectAsync++; - - removeListener(listener); -}); - - -// Test triggers with two async listeners -process.nextTick(function() { - addListener(listener); - addListener(listener); - - setTimeout(function() { - process.nextTick(function() { }); - expectAsync += 2; - }); - expectAsync += 2; - - removeListener(listener); - removeListener(listener); -}); - - -// Test callbacks from fs I/O -process.nextTick(function() { - addListener(listener); - - fs.stat('something random', function(err, stat) { }); - expectAsync++; - - setImmediate(function() { - fs.stat('random again', function(err, stat) { }); - expectAsync++; - }); - expectAsync++; - - removeListener(listener); -}); - - -// Test net I/O -process.nextTick(function() { - addListener(listener); - - var server = net.createServer(function(c) { }); - expectAsync++; - - server.listen(PORT, function() { - server.close(); - expectAsync++; - }); - expectAsync++; - - removeListener(listener); -}); - - -// Test UDP -process.nextTick(function() { - addListener(listener); - - var server = dgram.createSocket('udp4'); - expectAsync++; - - server.bind(PORT); - - server.close(); - expectAsync++; - - removeListener(listener); -}); diff --git a/node_modules/async-listener/test/core/core-asynclistener-add-inflight.js b/node_modules/async-listener/test/core/core-asynclistener-add-inflight.js deleted file mode 100644 index 0052a7e..0000000 --- a/node_modules/async-listener/test/core/core-asynclistener-add-inflight.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../../index.js'); - -var assert = require('assert'); - -function onAsync0() {} -function onAsync1() {} - -var once = 0; -var handlers0 = { - before: function (stor, err) { - // should catch the error *once* - once++; - } -} - -var handlers1 = { - before: function (stor, err) { - // handler was added in flight, and should not be called - throw "Should Never Be Called"; - } -} - -var key0 = process.addAsyncListener(onAsync0, handlers0); - -process.on('exit', function (err) { - // handlers0 before handler must be called once only - assert.equal(once, 1); - console.log('ok'); -}); - -setImmediate(function () { - 1; -}); - -process.addAsyncListener(onAsync1, handlers1); -process.removeAsyncListener(key0); diff --git a/node_modules/async-listener/test/core/core-asynclistener-error-throw-in-before-inflight.js b/node_modules/async-listener/test/core/core-asynclistener-error-throw-in-before-inflight.js deleted file mode 100644 index d6a502e..0000000 --- a/node_modules/async-listener/test/core/core-asynclistener-error-throw-in-before-inflight.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - - -if (!process.addAsyncListener) require('../../index.js'); - -var assert = require('assert'); - -function onAsync0() {} -function onAsync1() {} - -var once = 0; -var handlers0 = { - error: function (stor, err) { - // should catch the error *once* - once++; - } -} - -var handlers1 = { - error: function (stor, err) { - // this error handler is bound *after* the async callback - // and it should not handle the error - throw "Should Never Be Called"; - } -} - -var key0 = process.addAsyncListener(onAsync0, handlers0); - -process.on('uncaughtException', function (err) { - // handlers0 error handler must be called once only - assert.equal(once, 1); - console.log('ok'); -}); - -setImmediate(function () { - throw 1; -}); - -process.addAsyncListener(onAsync1, handlers1); -process.removeAsyncListener(key0); diff --git a/node_modules/async-listener/test/errors-this-tick.tap.js b/node_modules/async-listener/test/errors-this-tick.tap.js deleted file mode 100644 index c8a2474..0000000 --- a/node_modules/async-listener/test/errors-this-tick.tap.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -var assert = require('assert'); - -if (!process.addAsyncListener) require('../index.js'); - -function MiniCLS() { - this.active = Object.create(null); - this._stack = []; -} - -MiniCLS.prototype.enter = function (context) { - assert.ok(context, "context must be provided for entering"); - - this._stack.push(this.active); - this.active = context; -}; - -MiniCLS.prototype.exit = function (context) { - assert.ok(context, "context must be provided for exiting"); - - if (this.active === context) { - assert.ok(this._stack.length, "can't remove top context"); - this.active = this._stack.pop(); - return; - } - - var index = this._stack.lastIndexOf(context); - - assert.ok(index >= 0, "context not currently entered; can't exit"); - assert.ok(index, "can't remove top context"); - - this.active = this._stack[index - 1]; - this._stack.length = index - 1; -}; - -MiniCLS.prototype.run = function (fn) { - var context = Object.create(this.active); - this.enter(context); - try { - fn(context); - return context; - } - finally { - this.exit(context); - } -}; - -var cls = new MiniCLS(); -process.addAsyncListener( - { - create : function () { return cls.active; }, - before : function (context, domain) { cls.enter(domain); }, - after : function (context, domain) { cls.exit(domain); }, - error : function (domain) { if (domain) cls.exit(domain); } - } -); - -process.on('uncaughtException', function (err) { - if (err.message === 'oops') { - console.log('ok got expected error: %s', err.message); - } - else { - console.log('not ok got expected error: %s', err.stack); - } -}); - -cls.run(function () { - throw new Error('oops'); -}); diff --git a/node_modules/async-listener/test/fork-listen2-problem.tap.js b/node_modules/async-listener/test/fork-listen2-problem.tap.js deleted file mode 100644 index 590871a..0000000 --- a/node_modules/async-listener/test/fork-listen2-problem.tap.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var fork = require('child_process').fork; -var test = require('tap').test; - -var server - -test("parent listener", function (t) { - server = require('net').createServer(); - - server.listen(8585, function () { - t.ok(server, "parent listening on port 8585"); - - var listener = fork(__dirname + '/fork-listener.js'); - t.ok(listener, "child process started"); - - listener.on('message', function (message) { - if (message === 'shutdown') { - t.ok(message, "child handled error properly"); - listener.send('shutdown'); - } - else { - t.fail("parent got unexpected message " + message); - } - t.end(); - }); - }); -}); - -test("tearDown", function (t) { - server.close(); - t.end(); -}) diff --git a/node_modules/async-listener/test/fork-listener.js b/node_modules/async-listener/test/fork-listener.js deleted file mode 100644 index 4859003..0000000 --- a/node_modules/async-listener/test/fork-listener.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var domain = require('domain'); - -if (!process.addAsyncListener) require('../index.js'); - -var d = domain.create(); -d.on('error', function (error) { - process.send(error.message); -}); - -process.on('message', function (message) { - if (message === 'shutdown') { - process.exit(); - } - else { - process.send("child got unexpected message " + message); - } -}); - -d.run(function () { - var server = require('net').createServer(); - - server.on('error', function () { - process.send('shutdown'); - }); - - server.listen(8585, function () { - process.send("child shouldn't be able to listen on port 8585"); - }); -}); diff --git a/node_modules/async-listener/test/function-length-preserved.tap.js b/node_modules/async-listener/test/function-length-preserved.tap.js deleted file mode 100644 index cafd9fb..0000000 --- a/node_modules/async-listener/test/function-length-preserved.tap.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test; - -test("asyncListener preserves function length", function (t) { - t.plan(2); - - var fsLengthsPre = computeValueLengths(require('fs')); - var httpLengthsPre = computeValueLengths(require('http')); - - if (!process.addAsyncListener) require('../index.js'); - - var fsLengthsPost = computeValueLengths(require('fs')); - var httpLengthsPost = computeValueLengths(require('http')); - - t.same(fsLengthsPre, fsLengthsPost); - t.same(httpLengthsPre, httpLengthsPost); -}); - -function computeValueLengths(o) { - var lengths = []; - for (var k in o) { - lengths.push(o[k].length); - } - return lengths; -} diff --git a/node_modules/async-listener/test/handle.tap.js b/node_modules/async-listener/test/handle.tap.js deleted file mode 100644 index e480293..0000000 --- a/node_modules/async-listener/test/handle.tap.js +++ /dev/null @@ -1,34 +0,0 @@ -if (!process.addAsyncListener) require('../index.js'); - -var test = require('tap').test; -var net = require('net'); - -test('synchronous errors during connect return a null _handle', function(t){ - t.plan(3); - - // listening server - var server = net.createServer().listen(8000); - - // client - var client = net.connect({port: 8000}); - - client.on('connect', function(){ - t.ok(true, 'connect'); - // kill connection - client.end(); - }); - - client.on('error', function(){ - server.close(); - t.ok(true, 'done test'); - }); - - client.on('end', function() { - setTimeout(function(){ - // try to reconnect, but this has an error - // rather than throw the right error, we're going to get an async-listener error - t.ok(true, 'end'); - client.connect(8001); - }, 100); - }); -}); diff --git a/node_modules/async-listener/test/http-request.tap.js b/node_modules/async-listener/test/http-request.tap.js deleted file mode 100644 index b379993..0000000 --- a/node_modules/async-listener/test/http-request.tap.js +++ /dev/null @@ -1,307 +0,0 @@ -if (!process.addAsyncListener) require('../index.js'); - -var extend = require('util')._extend; -var test = require('tap').test; -var http = require('http'); - -// Convert semver string to number set -// TODO: This is *very* naive structure to check versions with, -// but it works well enough for now... -var nodeVersion = process.version.slice(1).split('.').map(Number) - -test('http.Agent socket reuse works', function(t){ - function main (done) { - var listener = addListner(); - var times = 2; - - var agent = new http.Agent({ - keepAlive: true, - maxFreeSockets: 1, - maxSockets: 1 - }); - - function after(rand, i) { - if (--times === 0) { - t.deepEqual( - listener.root, - expected, - 'should have equal state structures' - ); - if (agent.destroy) { - agent.destroy(); - } - done(); - } - } - - function ping(i) { - listener.currentName = 'ping #' + i + ' request'; - var addr = server.address(); - var req = http.request({ - agent: agent, - port: addr.port, - host: addr.host, - path: '/sub' - }, function (res) { - // The second request is a logical continuation of - // the first request, due to the http.Agent pooling - if (i === 0) { - t.equal( - listener.current.name, - 'ping #' + i + ' request', - 'should be ping #' + i + ' request' - ); - } else { - t.equal( - listener.current.name, - 'setImmediate to after #' + (i - 1), - 'should be setImmediate to after #' + (i - 1) - ); - } - - listener.currentName = 'res.resume ping #' + i; - const bufs = []; - res.on('data', function (chunk) { - bufs.push(chunk); - }); - res.on('end', function () { - const body = Buffer.concat(bufs).toString(); - t.equal('hello', body, 'should have body of "hello"') - t.equal( - listener.current.name, - 'res.resume ping #' + i, - 'should be res.resume ping #' + i - ); - listener.currentName = 'setImmediate to after #' + i; - setImmediate(after, i); - }); - }); - listener.currentName = 'req.end ping #' + i; - req.end(); - } - - for (var i = 0; i < times; i++) { - listener.currentName = 'setImmediate #' + i; - setImmediate(ping, i); - } - - process.removeAsyncListener(listener.listener); - - // - // NOTE: This expected structure building stuff is really complicated - // because the interactions in node internals changed so much from 0.10 - // until now. It could be a lot simpler if we only cared about testing - // the current stable, but this really needs to be tested back to 0.10. - // - // I'm sorry. :'( - // - function make (name, override) { - return extend({ - name: name, - children: [], - before: 1, - after: 1, - error: 0 - }, override || {}) - } - - // - // First ping branch - // - var innerResumeChildren = []; - if (nodeVersion[0] < 8) { - innerResumeChildren.push(make('res.resume ping #0')); - } - innerResumeChildren.push(make('setImmediate to after #0')); - - var innerResumeChildrenWrapped = [ - make('res.resume ping #0', { - children: innerResumeChildren - }), - make('res.resume ping #0'), - make('res.resume ping #0') - ]; - var innerPingChildren = []; - if (nodeVersion[0] == 0 && nodeVersion[1] < 12) { - innerPingChildren.push(make('res.resume ping #0')); - } - innerPingChildren.push(make('res.resume ping #0', { - children: nodeVersion[0] == 0 && nodeVersion[1] < 12 - ? innerResumeChildren - : innerResumeChildrenWrapped - })); - if (nodeVersion[0] > 0 || nodeVersion[1] > 10) { - if (nodeVersion[0] < 6 && nodeVersion[0] !== 4) { - innerPingChildren.push(make('res.resume ping #0')); - } - innerPingChildren.push( - make('res.resume ping #0', { - children: [make('res.resume ping #0')] - }), - make('res.resume ping #0') - ); - } - - var firstImmediateChildren = [ - make('ping #0 request', { - children: [ - make('ping #0 request', { - children: innerPingChildren - }), - make('ping #0 request', { - children: nodeVersion[0] > 0 || nodeVersion[1] > 10 - ? [make('req.end ping #1')] - : [] - }) - ] - }) - ]; - - if (nodeVersion[0] > 4) { - firstImmediateChildren.push(make('ping #0 request')); - }; - - firstImmediateChildren.push( - make('ping #0 request'), - make('ping #0 request', { - before: 0, - after: 0 - }) - ); - - var firstImmediate = make('setImmediate #0', { - children: firstImmediateChildren - }); - - // - // Second ping branch - // - var innerPingChildren = []; - if (nodeVersion[0] < 8) { - innerPingChildren.push(make('res.resume ping #1')); - } - - innerPingChildren.push(make('setImmediate to after #1', { - after: 0 - })); - - var innerPingChildrenWrapped = [ - make('res.resume ping #1', { - children: innerPingChildren - }), - make('res.resume ping #1'), - make('res.resume ping #1') - ]; - var innerImmediateChildren = []; - if (nodeVersion[0] == 0 && nodeVersion[1] < 12) { - innerImmediateChildren.push(make('res.resume ping #1')); - } - innerImmediateChildren.push(make('res.resume ping #1', { - children: nodeVersion[0] == 0 && nodeVersion[1] < 12 - ? innerPingChildren - : innerPingChildrenWrapped - })); - if (nodeVersion[0] > 0 || nodeVersion[1] > 10) { - if (nodeVersion[0] < 6 && nodeVersion[0] !== 4) { - innerImmediateChildren.push(make('res.resume ping #1')); - } - innerImmediateChildren.push( - make('res.resume ping #1', { - children: [make('res.resume ping #1')] - }), - make('res.resume ping #1') - ); - } - - var secondImmediate = make('setImmediate #1', { - children: [ - make('ping #1 request', { - children: [ - make('setImmediate to after #0', { - children: innerImmediateChildren - }), - make('setImmediate to after #0', { - children: [make('setImmediate to after #0')] - }) - ] - }) - ] - }); - - // - // Make expected object - // - var expected = make('root', { - children: [ - firstImmediate, - secondImmediate - ], - before: 0, - after: 0 - }); - } - - var server = http.createServer(function (req, res) { - res.end('hello'); - }); - - // - // Test client - // - server.listen(function () { - main(function () { - server.close(); - server.on('close', function () { - t.end(); - }); - }); - }); -}); - -function addListner() { - var listener = process.addAsyncListener({ - create: create, - before: before, - after: after, - error: error - }); - - var state = { - listener: listener, - currentName: 'root' - }; - - state.root = create(); - state.current = state.root; - - return state; - - function create () { - var node = { - name: state.currentName, - children: [], - before: 0, - after: 0, - error: 0 - }; - - if(state.current) state.current.children.push(node); - return node; - } - - function before(ctx, node) { - state.current = node; - state.current.before++; - } - - function after(ctx, node) { - node.after++; - state.current = null; - } - - function error(ctx, node) { - node.error++; - state.current = null; - return false; - } -} diff --git a/node_modules/async-listener/test/native-promises.tap.js b/node_modules/async-listener/test/native-promises.tap.js deleted file mode 100644 index b893741..0000000 --- a/node_modules/async-listener/test/native-promises.tap.js +++ /dev/null @@ -1,2236 +0,0 @@ -if (!global.Promise) return; - -var test = require('tap').test; - -var unwrappedPromise = global.Promise; -var resolvedBeforeWrap = unwrappedPromise.resolve(123) - -require('../index.js'); - -// Convert semver string to number set -// TODO: This is *very* naive structure to check versions with, -// but it works well enough for now... -var nodeVersion = process.version.slice(1).split('.').map(Number) - -test('then', function(t) { - var listener = addListner(); - - var promise = new Promise(function(accept, reject) { - listener.currentName = 'accept'; - accept(10); - }); - - promise.then(function(val) { - listener.currentName = 'nextTick in first then'; - process.nextTick(function() { - t.strictEqual(val, 10); - }); - listener.currentName = 'first then continuation'; - }); - - listener.currentName = 'setImmediate in root'; - setImmediate(function() { - promise.then(function(val) { - t.strictEqual(val, 10); - t.strictEqual(this, global); - listener.currentName = 'setTimeout in 2nd then'; - setTimeout(function() { - t.deepEqual(listener.root, expected); - t.end(); - }); - listener.currentName = '2nd then continuation'; - }); - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [ - { - name: 'accept', - children: [ - { - name: 'nextTick in first then', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'first then continuation', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'setTimeout in 2nd then', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 2, - after: 2, - error: 0 - }, - { - name: 'accept', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'setImmediate in root', - children: [ - { - name: 'first then continuation', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } -}); - -test('catch', function(t) { - var listener = addListner(); - - var promise = new Promise(function(accept, reject) { - listener.currentName = 'reject'; - reject(15); - }); - - listener.currentName = 'catch'; - promise.catch(function(val) { - listener.currentName = 'nextTick in catch'; - process.nextTick(function() { - t.strictEqual(val, 15); - }); - listener.currentName = 'catch continuation'; - }); - - listener.currentName = 'setImmediate in root'; - setImmediate(function() { - promise.then( - function fullfilled() { - throw new Error('should not be called on reject'); - }, - function rejected(val) { - t.strictEqual(val, 15); - t.strictEqual(this, global); - listener.currentName = 'setTimeout in then'; - setTimeout(function() { - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 3) { - expected.children.splice(-1, 0, { - name: 'catch', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - t.deepEqual(listener.root, expected); - t.end(); - }); - listener.currentName = 'then continuation'; - } - ) - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [ - { - name: 'reject', - children: [ - { - name: 'nextTick in catch', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'setTimeout in then', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 2, - after: 2, - error: 0 - }, - { - name: 'setImmediate in root', - children: [ - { - name: 'catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'catch continuation', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - }; -}); - -test('Promise.resolve', function resolveTest(t) { - var listener = addListner(); - - listener.currentName = 'resolve'; - var p = Promise.resolve(123); - - p.then(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - t.equal(value, 123); - t.deepEqual(listener.root, { - name: 'root', - children: [{ - name: 'resolve', - children: [{ - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }], - before: 1, - after: 1, - error: 0 - }, - { - name: 'resolve', - children: [], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - }); - t.end(); - }); - process.removeAsyncListener(listener.listener); - }); -}); - -test('Promise.reject', function rejectTest(t) { - var listener = addListner(); - - listener.currentName = 'reject'; - var p = Promise.reject(123); - - listener.currentName = 'catch'; - p.catch(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - t.equal(value, 123); - - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 2) { - expected.children.push({ - name: 'catch', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = 'catch continuation'; - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [{ - name: 'reject', - children: [ - { - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - } -}); - -test('Promise.all', function allTest(t) { - var listener = addListner(); - - listener.currentName = 'resolve 1'; - var a = Promise.resolve(123); - listener.currentName = 'resolve 2'; - var b = Promise.resolve(456); - listener.currentName = 'all'; - var p = Promise.all([a, b]); - - p.then(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - process.removeAsyncListener(listener.listener); - t.deepEqual(value, [123, 456]); - t.deepEqual(listener.root, { - name: 'root', - children: [{ - name: 'resolve 1', - children: [{ - // Internal continuation of a used for making the race future. - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }], - before: 1, - after: 1, - error: 0 - }, { - name: 'resolve 2', - children: [ - { - name: 'all', - children: [ - { - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - // Internal continuation of b used for making the race future. - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - }); - t.end(); - }); - - listener.currentName = 'then continuation'; - }); -}); - -test('Promise.all reject', function allTest(t) { - var listener = addListner(); - - listener.currentName = 'resolve'; - var a = Promise.resolve(123); - listener.currentName = 'reject'; - var b = Promise.reject(456); - listener.currentName = 'all'; - var p = Promise.all([a, b]); - - p.catch(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 3) { - expected.children.push({ - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - process.removeAsyncListener(listener.listener); - t.equal(value, 456); - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = 'catch continuation'; - }); - - var expected = { - name: 'root', - children: [{ - name: 'resolve', - children: [{ - // Internal continuation of a used for making the race future. - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }], - before: 1, - after: 1, - error: 0 - }, { - name: 'reject', - children: [ - { - name: 'all', - children: [ - { - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - // Internal continuation of b used for making the race future. - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'all', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'all', - children: [], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - } -}); - -test('Promise.race', function raceTest(t) { - var listener = addListner(); - - listener.currentName = 'resolve 1'; - var a = Promise.resolve(123); - listener.currentName = 'resolve 2'; - var b = Promise.resolve(456); - listener.currentName = 'race'; - var p = Promise.race([a, b]); - - p.then(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - process.removeAsyncListener(listener.listener); - t.equal(value, 123); - t.deepEqual(listener.root, { - name: 'root', - children: [{ - name: 'resolve 1', - children: [ - { - name: 'race', - children: [ - { - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - // Internal continuation of a used for making the race future. - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, { - name: 'resolve 2', - children: [{ - // Internal continuation of b used for making the race future. - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - }); - t.end(); - }); - - listener.currentName = 'then continuation'; - }); -}); - -test('Promise.race - reject', function raceTest(t) { - var listener = addListner(); - - listener.currentName = 'reject'; - var a = Promise.reject(123); - listener.currentName = 'resolve'; - var b = Promise.resolve(456); - listener.currentName = 'race'; - var p = Promise.race([a, b]); - - p.catch(function then(value) { - listener.currentName = 'nextTick'; - process.nextTick(function next() { - process.removeAsyncListener(listener.listener); - t.equal(value, 123); - - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 3) { - expected.children.push({ - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = 'catch continuation'; - }); - - var expected = { - name: 'root', - children: [{ - name: 'reject', - children: [ - { - name: 'race', - children: [ - { - name: 'nextTick', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - // Internal continuation of a used for making the race future. - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, { - name: 'resolve', - children: [{ - // Internal continuation of b used for making the race future. - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'race', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'race', - children: [], - before: 1, - after: 1, - error: 0 - }], - before: 0, - after: 0, - error: 0 - } -}); - -test('instanceof', function diferTest(t) { - var p = Promise.resolve(10); - - t.ok(p instanceof Promise, 'instanceof should work on wrapped Promise'); - t.ok(p instanceof unwrappedPromise, 'instanceof should work on unwrapped Promise'); - t.end() -}); - -test('then chain with promise', function(t) { - var listener = addListner(); - - listener.currentName = 'accept'; - var promise = Promise.resolve(10); - - promise - .then(function(val) { - return new Promise(function wait(accept) { - listener.currentName = 'nextTick in nested promise'; - process.nextTick(function() { - listener.currentName = 'accept from nextTick'; - accept(val); - }); - }); - }) - .then(function validate(val) { - t.strictEqual(val, 10); - t.strictEqual(this, global); - - listener.currentName = 'setTimeout in 2nd then'; - setTimeout(function() { - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = '2nd then continuation'; - }); - - process.removeAsyncListener(listener.listener); - - // Promise resolution changed slightly in node v6, - // now resolve/reject wraps again on completion. - var children = [] - if (nodeVersion[0] >= 6) { - children.push({ - name: 'accept from nextTick', - children: [], - before: 0, - after: 0, - error: 0 - }) - } - children.push( - { - name: 'setTimeout in 2nd then', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ) - - var expected = { - name: 'root', - children: [ - { - name: 'accept', - children: [ - { - name: 'nextTick in nested promise', - children: [ - { - name: 'accept from nextTick', - children: children, - before: children.length - 1, - after: children.length - 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'accept', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'accept', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } -}); - -test('then chain with rejected promise', function(t) { - var listener = addListner(); - - listener.currentName = 'reject'; - var promise = Promise.reject(10); - - promise - .then(fail, function(val) { - return new Promise(function wait(accept, reject) { - listener.currentName = 'nextTick in nested promise'; - process.nextTick(function() { - listener.currentName = 'reject from nextTick'; - reject(val); - }); - }); - }) - .then(fail, function validate(val) { - t.strictEqual(val, 10); - t.strictEqual(this, global); - - listener.currentName = 'setTimeout in 2nd then'; - setTimeout(function() { - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 2) { - expected.children.splice(1, 0, { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = '2nd then continuation'; - }); - - function fail() { - t.fail('should not be called'); - t.end(); - } - - process.removeAsyncListener(listener.listener); - - // Promise resolution changed slightly in node v6, - // now resolve/reject wraps again on completion. - var children = [] - if (nodeVersion[0] >= 6) { - children.push({ - name: 'reject from nextTick', - children: [], - before: 0, - after: 0, - error: 0 - }) - } - children.push( - { - name: 'setTimeout in 2nd then', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ) - - var expected = { - name: 'root', - children: [ - { - name: 'reject', - children: [ - { - name: 'nextTick in nested promise', - children: [ - { - name: 'reject from nextTick', - children: children, - before: children.length - 1, - after: children.length - 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } -}); - -test('multi catch with promise', function(t) { - var listener = addListner(); - - listener.currentName = 'reject'; - var promise = Promise.reject(10); - - promise - .catch(function(val) { - return new Promise(function wait(accept, reject) { - listener.currentName = 'nextTick in nested promise'; - process.nextTick(function() { - listener.currentName = 'reject from nextTick'; - reject(val); - }); - }); - }) - .catch(function validate(val) { - t.strictEqual(val, 10); - t.strictEqual(this, global); - - listener.currentName = 'setTimeout in 2nd catch'; - setTimeout(function() { - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 2) { - expected.children.splice(1, 0, { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = '2nd catch continuation'; - }); - - process.removeAsyncListener(listener.listener); - - // Promise resolution changed slightly in node v6, - // now resolve/reject wraps again on completion. - var children = [] - if (nodeVersion[0] >= 6) { - children.push({ - name: 'reject from nextTick', - children: [], - before: 0, - after: 0, - error: 0 - }) - } - children.push( - { - name: 'setTimeout in 2nd catch', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd catch continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ) - - var expected = { - name: 'root', - children: [ - { - name: 'reject', - children: [ - { - name: 'nextTick in nested promise', - children: [ - { - name: 'reject from nextTick', - children: children, - before: children.length - 1, - after: children.length - 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } -}); - -test('throw in executor', function(t) { - var listener = addListner(); - - var promise = new Promise(function unsafe() { - listener.currentName = 'throw'; - throw 10; - }); - - promise.catch(function(val) { - t.equal(val, 10, 'should match thrown value') - if (listener.root.children.length === 2) { - expected.children.splice(1, 0, { - name: 'throw', - children: [], - before: 1, - after: 0, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [ - { - name: 'throw', - children: [ - ], - before: 1, - after: 0, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } -}); - -test('Promise.resolve().catch().then()', function (t) { - var listenerState = addListner(); - - t.plan(1); - listenerState.currentName = 'resolve' - var p = Promise.resolve(1) - - listenerState.currentName = 'return of 1st catch that didnt get run' - p = p.catch(function () {}) - - p = p.then(function () { - listenerState.currentName = 'returned by 1st then' - throw new Error() - }) - - p = p.catch(function () { - listenerState.currentName = 'returned by 2nd catch' - throw new Error - }); - - p = p.then(function () {}, function () { - listenerState.currentName = 'returned by 2nd then' - throw new Error() - }); - - p = p.catch(function () { - t.deepEqual(listenerState.root, expected); - }); - - var expected = { - name: 'root', - children: [ - { - name: 'resolve', - children: [ - { - name: 'return of 1st catch that didnt get run', - children: [ - { - name: 'returned by 1st then', - children: [ - { - name: 'returned by 2nd catch', - children: [ - { - name: 'returned by 2nd then', - children: [], - before: 1, - after: 0, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: 'return of 1st catch that didnt get run', - children: [], - before: 1, - after: 0, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } - - process.removeAsyncListener(listenerState.listener); -}); - -test('continue from unwrapped promise', function(t) { - var listener = addListner(); - - listener.currentName = 'resolve'; - resolvedBeforeWrap.then(function(val) { - t.equal(val, 123, 'should match resolved value'); - listener.currentName = '2nd resolve'; - return 456; - }).then(function (val) { - t.equal(val, 456, 'should match resolved value'); - t.deepEqual(listener.root, expected); - t.end(); - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [{ - name : 'resolve', - children : [{ - name : '2nd resolve', - children : [], - before : 1, - after : 0, - error : 0 - }], - before : 1, - after : 1, - error : 0 - }, - { - name : 'resolve', - children : [], - before : 1, - after : 0, - error : 0 - }], - before: 0, - after: 0, - error: 0 - }; -}); - -test('return unwrapped promise', function(t) { - var listener = addListner(); - - listener.currentName = 'resolve'; - Promise.resolve(890).then(function (val) { - t.equal(val, 890, 'should match resolved value'); - return resolvedBeforeWrap; - }).then(function(val) { - t.equal(val, 123, 'should match resolved value'); - return 456; - }).then(function (val) { - t.equal(val, 456, 'should match resolved value'); - t.deepEqual(listener.root, expected); - t.end(); - }); - - process.removeAsyncListener(listener.listener); - - var expected = { - name: 'root', - children: [{ - name : 'resolve', - children : [], - before : 1, - after : 1, - error : 0 - }, - { - name : 'resolve', - children : [], - before : 1, - after : 1, - error : 0 - }, - { - name : 'resolve', - children : [{ - name : 'resolve', - children : [], - before : 1, - after : 0, - error : 0 - }], - before : 1, - after : 1, - error : 0 - }, - { - name : 'resolve', - children : [], - before : 1, - after : 0, - error : 0 - }], - before: 0, - after: 0, - error: 0 - }; -}); - -test('resume context after unwrapped promise', function(t) { - var listener = addListner(); - - listener.currentName = 'resolve'; - var wrapped = Promise.resolve(456); - - listener.currentName = 'unwrapped resolve'; - resolvedBeforeWrap.then(function(val) { - t.equal(val, 123, 'should match resolved value'); - listener.currentName = 'maybe internal resolve'; - return wrapped - }).then(function (val) { - t.equal(val, 456, 'should match resolved value'); - listener.currentName = 'return after continuing from wrapped promise'; - return 89 - }).then(function (val) { - t.equal(val, 89, 'should match resolved value'); - t.deepEqual(listener.root, expected); - t.end(); - }); - - process.removeAsyncListener(listener.listener); - - // Promise resolution changed slightly in node v6, - // now resolve/reject wraps again on completion. - var children = [] - if (nodeVersion[0] >= 6) { - children.push({ - name : 'maybe internal resolve', - children : [], - before : 0, - after : 0, - error : 0 - }) - } - children.push({ - name : 'return after continuing from wrapped promise', - children : [], - before : 1, - after : 0, - error : 0 - }) - - var expected = { - name: 'root', - children: [{ - name : 'resolve', - children : children, - before : children.length, - after : children.length, - error : 0 - }, - { - name : 'unwrapped resolve', - children : [], - before : 1, - after : 1, - error : 0 - }, - { - name : 'unwrapped resolve', - children : [], - before : 1, - after : 1, - error : 0 - }, - { - name : 'unwrapped resolve', - children : [], - before : 1, - after : 0, - error : 0 - }], - before: 0, - after: 0, - error: 0 - }; -}); - -function addListner() { - var listener = process.addAsyncListener({ - create: create, - before: before, - after: after, - error: error - }); - - - var state = { - listener: listener, - currentName: 'root' - }; - - state.root = create(); - state.current = state.root; - - return state; - - function create () { - var node = { - name: state.currentName, - children: [], - before: 0, - after: 0, - error: 0 - }; - - if(state.current) state.current.children.push(node); - return node; - } - - function before(ctx, node) { - state.current = node; - state.current.before++; - } - - function after(ctx, node) { - node.after++; - state.current = null; - } - - function error(ctx, node) { - node.error++; - state.current = null; - return false; - } -} - -// for the following, -// -// https://github.com/v8/v8/commits/master/src/js/promise-extra.js -// -// is helpful context -- none of these are part of ES2015 promises, and were -// set up to be removed. - -// Node.js = 6) { - children.push({ - name: 'accept from nextTick', - children: [], - before: 0, - after: 0, - error: 0 - }) - } - children.push( - { - name: 'setTimeout in 2nd chain', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd then continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ) - - var expected = { - name: 'root', - children: [ - { - name: 'accept', - children: [ - { - name: 'nextTick in nested promise', - children: [ - { - name: 'accept from nextTick', - children: children, - before: children.length - 1, - after: children.length - 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'accept', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'accept', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } - }); - - test('multi chain with rejected promise', function(t) { - var listener = addListner(); - - listener.currentName = 'reject'; - var promise = Promise.reject(10); - - promise - .chain(fail, function(val) { - return new Promise(function wait(accept, reject) { - listener.currentName = 'nextTick in nested promise'; - process.nextTick(function() { - listener.currentName = 'reject from nextTick'; - reject(val); - }); - }); - }) - .chain(fail, function validate(val) { - t.strictEqual(val, 10); - t.strictEqual(this, global); - - listener.currentName = 'setTimeout in 2nd chain'; - setTimeout(function() { - // some version of iojs use nextTick for some parts of its async - if (listener.root.children.length === 2) { - expected.children.splice(1, 0, { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - t.deepEqual(listener.root, expected); - t.end(); - }); - - listener.currentName = '2nd chain continuation'; - }); - - function fail() { - t.fail('should not be called'); - t.end(); - } - - process.removeAsyncListener(listener.listener); - - // Promise resolution changed slightly in node v6, - // now resolve/reject wraps again on completion. - var children = [] - if (nodeVersion[0] >= 6) { - children.push({ - name: 'reject from nextTick', - children: [], - before: 0, - after: 0, - error: 0 - }) - } - children.push( - { - name: 'setTimeout in 2nd chain', - children: [], - before: 1, - after: 0, - error: 0 - }, - { - name: '2nd chain continuation', - children: [], - before: 0, - after: 0, - error: 0 - } - ) - - var expected = { - name: 'root', - children: [ - { - name: 'reject', - children: [ - { - name: 'nextTick in nested promise', - children: [ - { - name: 'reject from nextTick', - children: children, - before: children.length - 1, - after: children.length - 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - }, - { - name: 'reject', - children: [], - before: 0, - after: 0, - error: 0 - }, - { - name: 'reject', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - } - }); -} - -test('es6 subclasses', function(t) { - if (nodeVersion[0] < 6) { - t.pass('class syntax is not supported before node 6'); - t.end(); - return; - } - - // Promise subclasses do 2 asserts per promise. - t.plan(13); - - var SubclassedPromise = require('./promise-subclass.js'); - var StandardSubclassedPromise = SubclassedPromise(t, false); - var SubclassedPromiseCustomSpecies = SubclassedPromise(t, true); - - var s = StandardSubclassedPromise.resolve(42).then(function(val) { - t.strictEqual(val, 42); - t.end(); - }); - - var p1 = - new StandardSubclassedPromise(function(resolve) { resolve(123); }) - .then(function() {}); - t.ok(p1 instanceof StandardSubclassedPromise, - 'should be StandardSubclassedPromise instance'); - t.ok(p1 instanceof unwrappedPromise, 'should be unwrappedPromise instance'); - t.ok(p1 instanceof Promise, 'should be base Promise instance'); - - var p2 = - new SubclassedPromiseCustomSpecies(function(resolve) { resolve(123); }) - .then(function() {}); - t.notOk(p2 instanceof SubclassedPromiseCustomSpecies, - 'should not be SubclassedPromiseCustomSpecies instance'); - t.ok(p2 instanceof unwrappedPromise, 'should be unwrappedPromise instance'); - t.ok(p2 instanceof Promise, 'should be base Promise instance'); -}); diff --git a/node_modules/async-listener/test/no-after-following-error.tap.js b/node_modules/async-listener/test/no-after-following-error.tap.js deleted file mode 100644 index 107f9a8..0000000 --- a/node_modules/async-listener/test/no-after-following-error.tap.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tap').test; - -if (!global.setImmediate) global.setImmediate = setTimeout; - -test("after handler not run on throw", function (t) { - t.plan(2); - - if (!process.addAsyncListener) require('../index.js'); - - var key = process.createAsyncListener( - { - create : function () { return {}; }, - after : function asyncAfter() { t.fail("after was called"); }, - error : function asyncError(domain) { t.ok(domain, "got error"); } - } - ); - - process.addAsyncListener(key); - - setImmediate(function () { - throw new Error('whoops'); - }); - - function handler(err) { - process.removeAsyncListener(key); - process.removeListener('uncaughtException', handler); - t.ok(err, "error was propagated"); - } - - process.on('uncaughtException', handler); -}); diff --git a/node_modules/async-listener/test/overlapping-nexttick.tap.js b/node_modules/async-listener/test/overlapping-nexttick.tap.js deleted file mode 100644 index 2409500..0000000 --- a/node_modules/async-listener/test/overlapping-nexttick.tap.js +++ /dev/null @@ -1,192 +0,0 @@ -var test = require('tap').test - , assert = require('assert') - ; - -if (!global.setImmediate) global.setImmediate = setTimeout; - -/** - * - * - * - * - * SETUP AND BOILERPLATE - * - * - * - */ -if (!process.addAsyncListener) require('../index.js'); - -/* - * CLS code - */ -function Namespace () { - this.active = Object.create(null); - this._stack = []; - this.id = null; -} - -Namespace.prototype.set = function (key, value) { - this.active[key] = value; - return value; -}; - -Namespace.prototype.get = function (key) { - return this.active[key]; -}; - -Namespace.prototype.enter = function (context) { - assert.ok(context, "context must be provided for entering"); - - this._stack.push(this.active); - this.active = context; -}; - -Namespace.prototype.exit = function (context) { - assert.ok(context, "context must be provided for exiting"); - - if (this.active === context) { - assert.ok(this._stack.length, "can't remove top context"); - this.active = this._stack.pop(); - return; - } - - var index = this._stack.lastIndexOf(context); - - assert.ok(index >= 0, "context not currently entered; can't exit"); - assert.ok(index, "can't remove top context"); - - this.active = this._stack[index - 1]; - this._stack.length = index - 1; -}; - -Namespace.prototype.createContext = function () { - return Object.create(this.active); -}; - -Namespace.prototype.run = function (fn) { - var context = this.createContext(); - this.enter(context); - try { - fn(context); - return context; - } - finally { - this.exit(context); - } -}; - -Namespace.prototype.bind = function (fn, context) { - if (!context) context = this.active; - var self = this; - return function () { - self.enter(context); - try { - return fn.apply(this, arguments); - } - finally { - self.exit(context); - } - }; -}; - -function create(name) { - assert.ok(name, "namespace must be given a name!"); - - var namespace = new Namespace(name); - namespace.id = process.addAsyncListener( - { - create : function () { return namespace.active; }, - before : function (context, domain) { namespace.enter(domain); }, - after : function (context, domain) { namespace.exit(domain); } - } - ); - - return namespace; -} - -/* - * Transaction code - */ -var id = 1337; -function Transaction() { this.id = id++; } - -/* - * Tracer code - */ -var namespace = create("__NR_tracer"); -function getTransaction() { - var state = namespace.get('state'); - if (state) return state.transaction; -} - -function transactionProxy(handler) { - return function wrapTransactionInvocation() { - var state = {transaction : new Transaction()}; - - var context = namespace.createContext(); - context.state = state; - - return namespace.bind(handler, context).apply(this, arguments); - }; -} - - -/** - * - * - * - * - * TESTS - * - * - * - */ - -test("overlapping requests", function (t) { - t.plan(2); - - t.test("simple overlap", function (t) { - t.plan(3); - - setImmediate(function () { console.log('!'); }); - - var n = create("test2"); - t.ok(!n.get('state'), "state should not yet be visible"); - - n.run(function () { - n.set('state', true); - t.ok(n.get('state'), "state should be visible"); - - setImmediate(function () { t.ok(n.get('state'), "state should be visible"); }); - }); - }); - - t.test("two process.nextTicks", function (t) { - t.plan(6); - - function handler(id) { - var transaction = getTransaction(); - t.ok(transaction, "transaction should be visible"); - t.equal((transaction || {}).id, id, "transaction matches"); - } - - t.ok(!getTransaction(), "transaction should not yet be visible"); - - var first; - var proxied = transactionProxy(function () { - t.ok(getTransaction(), "transaction should be visible"); - - first = getTransaction().id; - process.nextTick(function () { handler(first); }, 42); - }); - proxied(); - - process.nextTick(transactionProxy(function () { - t.ok(getTransaction(), "transaction should be visible"); - - var second = getTransaction().id; - t.notEqual(first, second, "different transaction IDs"); - process.nextTick(function () { handler(second); }, 42); - }), 42); - }); -}); diff --git a/node_modules/async-listener/test/promise-subclass.js b/node_modules/async-listener/test/promise-subclass.js deleted file mode 100644 index 2fb3eb4..0000000 --- a/node_modules/async-listener/test/promise-subclass.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -module.exports = (tap, customSpecies) => { - if (customSpecies) { - return class SubclassedPromise extends Promise { - static get [Symbol.species]() { return Promise; } - then(onSuccess, onReject) { - tap.type(onSuccess, 'function'); - tap.type(onReject, 'undefined'); - return super.then(onSuccess, onReject); - } - }; - } else { - return class SubclassedPromise extends Promise { - then(onSuccess, onReject) { - tap.type(onSuccess, 'function'); - tap.type(onReject, 'undefined'); - return super.then(onSuccess, onReject); - } - }; - } -}; diff --git a/node_modules/async-listener/test/simple-counter-with-io.tap.js b/node_modules/async-listener/test/simple-counter-with-io.tap.js deleted file mode 100644 index 39b5cb2..0000000 --- a/node_modules/async-listener/test/simple-counter-with-io.tap.js +++ /dev/null @@ -1,28 +0,0 @@ -var test = require('tap').test; - -if (!global.setImmediate) global.setImmediate = setTimeout; - -test("asyncListeners work as expected with process.nextTick", function (t) { - t.plan(1); - - if (!process.addAsyncListener) require('../index.js'); - - console.log('+'); - // comment out this line to get the expected result: - setImmediate(function () { console.log('!'); }); - - var counter = 1; - var current; - process.addAsyncListener( - { - create : function listener() { return counter++; }, - before : function (_, domain) { current = domain; }, - after : function () { current = null; } - } - ); - - setImmediate(function () { t.equal(current, 1); }); - // uncomment this line to get the expected result: - // process.removeAsyncListener(id); -}); - diff --git a/node_modules/async-listener/test/simple-counter.tap.js b/node_modules/async-listener/test/simple-counter.tap.js deleted file mode 100644 index a611132..0000000 --- a/node_modules/async-listener/test/simple-counter.tap.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tap').test; - -test("asyncListeners work as expected with process.nextTick", function (t) { - t.plan(4); - - if (!process.addAsyncListener) require('../index.js'); - - var active - , cntr = 0 - ; - - process.addAsyncListener( - { - create : function () { return { val : ++cntr }; }, - before : function (context, data) { active = data.val; }, - after : function () { active = null; } - } - ); - - process.nextTick(function () { - t.equal(active, 1); - process.nextTick(function () { t.equal(active, 3); }); - }); - - process.nextTick(function () { - t.equal(active, 2); - process.nextTick(function () { t.equal(active, 4); }); - }); -}); diff --git a/node_modules/async-listener/test/simplified-error.simple.js b/node_modules/async-listener/test/simplified-error.simple.js deleted file mode 100644 index a885aa2..0000000 --- a/node_modules/async-listener/test/simplified-error.simple.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright Joyent, Inc. and other Node 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. - -if (!process.addAsyncListener) require('../index.js'); - -var assert = require('assert'); -var fs = require('fs'); -var addListener = process.addAsyncListener; -var removeListener = process.removeAsyncListener; - -var caught = 0; -var expectCaught = 0; - -var callbacksObj = { - error: function(domain, er) { - caught++; - - switch (er.message) { - case 'fs - nested file does not exist': - return true; - - default: - return false; - } - } -}; - -process.on('exit', function() { - console.log('caught:', caught); - console.log('expected:', expectCaught); - assert.equal(caught, expectCaught, 'caught all expected errors'); - console.log('ok'); -}); - -var listener = process.createAsyncListener(callbacksObj); - -// Nested FS -process.nextTick(function() { - addListener(listener); - - setTimeout(function() { - fs.stat('does not exist', function() { - throw new Error('fs - nested file does not exist'); - }); - expectCaught++; - }); - - removeListener(listener); -}); diff --git a/node_modules/async-listener/test/spawn.tap.js b/node_modules/async-listener/test/spawn.tap.js deleted file mode 100644 index 1f78845..0000000 --- a/node_modules/async-listener/test/spawn.tap.js +++ /dev/null @@ -1,100 +0,0 @@ -var test = require('tap').test - , assert = require('assert') - ; - -if (!global.setImmediate) global.setImmediate = setTimeout; - -if (!process.addAsyncListener) require('../index.js'); - -var childProcess = require('child_process') - , exec = childProcess.exec - , execFile = childProcess.execFile - , spawn = childProcess.spawn - ; - -test('ChildProcess', function (t) { - t.plan(3); - - t.test('exec', function (t) { - t.plan(3); - - var active - , cntr = 0 - ; - - process.addAsyncListener( - { - create : function () { return { val : ++cntr }; }, - before : function (context, data) { active = data.val; }, - after : function () { active = null; } - } - ); - - t.equal(active, undefined, - 'starts in initial context'); - process.nextTick(function () { - t.equal(active, 1, - 'after tick: 1st context'); - var child = exec('node --version'); - child.on('exit', function (code) { - t.ok(active >= 2, - 'after exec#exit: entered additional contexts'); - }) - }); - }); - - t.test('execFile', function (t) { - t.plan(3); - - var active - , cntr = 0 - ; - - process.addAsyncListener( - { - create : function () { return { val : ++cntr }; }, - before : function (context, data) { active = data.val; }, - after : function () { active = null; } - } - ); - - t.equal(active, undefined, - 'starts in initial context'); - process.nextTick(function () { - t.equal(active, 1, - 'after nextTick: 1st context'); - execFile('node', ['--version'], function (err, code) { - t.ok(active >= 2, - 'after execFile: entered additional contexts'); - }); - }); - }); - - t.test('spawn', function (t) { - t.plan(3); - - var active - , cntr = 0 - ; - - process.addAsyncListener( - { - create : function () { return { val : ++cntr }; }, - before : function (context, data) { active = data.val; }, - after : function () { active = null; } - } - ); - - t.equal(active, undefined, - 'starts in initial context'); - process.nextTick(function () { - t.equal(active, 1, - 'after tick: 1st context'); - var child = spawn('node', ['--version']); - child.on('exit', function (code) { - t.ok(active >= 2, - 'after spawn#exit: entered additional contexts'); - }) - }); - }); -}); diff --git a/node_modules/async-listener/test/timers.tap.js b/node_modules/async-listener/test/timers.tap.js deleted file mode 100644 index aeeade4..0000000 --- a/node_modules/async-listener/test/timers.tap.js +++ /dev/null @@ -1,159 +0,0 @@ -if (!process.addAsyncListener) require('../index.js'); - -var test = require('tap').test; -var net = require('net'); - -test('test process.nextTick', function (t) { - test_helper(t, function (listener, done) { - listener.currentName = 'process.nextTick'; - process.nextTick(done); - }, { - name: 'root', - children: [ - { - name: 'process.nextTick', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - }); -}); - -test('test setTimeout', function (t) { - test_helper(t, function (listener, done) { - listener.currentName = 'setTimeout'; - setTimeout(done, 1); - }, { - name: 'root', - children: [ - { - name: 'setTimeout', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - }); -}); - -test('test setImmediate', function (t) { - test_helper(t, function (listener, done) { - listener.currentName = 'setImmediate'; - setImmediate(done); - }, { - name: 'root', - children: [ - { - name: 'setImmediate', - children: [], - before: 1, - after: 1, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - }); -}); - -test('test setInterval', function (t) { - test_helper(t, function (listener, done) { - listener.currentName = 'setInterval'; - var count = 0; - var interval = setInterval(function () { - if (++count === 2) { - clearInterval(interval); - done(); - } - }); - }, { - name: 'root', - children: [ - { - name: 'setInterval', - children: [], - before: 2, - after: 2, - error: 0 - } - ], - before: 0, - after: 0, - error: 0 - }); -}); - -function test_helper (t, run, expect) { - // Trigger callback out-of-band from async listener - var done; - var interval = setInterval(function () { - if (done) { - clearInterval(interval); - t.deepEqual(listener.root, expect); - t.end(); - } - }, 5); - - var listener = addListner(); - run(listener, function () { done = true; }); - process.removeAsyncListener(listener.listener); -} - -function addListner() { - var listener = process.addAsyncListener({ - create: create, - before: before, - after: after, - error: error - }); - - - var state = { - listener: listener, - currentName: 'root' - }; - - state.root = create(); - state.current = state.root; - - return state; - - function create () { - var node = { - name: state.currentName, - children: [], - before: 0, - after: 0, - error: 0 - }; - - if(state.current) state.current.children.push(node); - return node; - } - - function before(ctx, node) { - state.current = node; - state.current.before++; - } - - function after(ctx, node) { - node.after++; - state.current = null; - } - - function error(ctx, node) { - node.error++; - state.current = null; - return false; - } -} diff --git a/node_modules/async-listener/test/zlib.tap.js b/node_modules/async-listener/test/zlib.tap.js deleted file mode 100644 index 55938e3..0000000 --- a/node_modules/async-listener/test/zlib.tap.js +++ /dev/null @@ -1,214 +0,0 @@ -if (!process.addAsyncListener) require('../index.js'); - -var test = require('tap').test; -var zlib = require('zlib'); - -// Convert semver string to number set -// TODO: This is *very* naive structure to check versions with, -// but it works well enough for now... -var nodeVersion = process.version.slice(1).split('.').map(Number) - -var compressors = ['deflate', 'deflateRaw', 'gzip']; -var decompressors = ['inflate', 'inflateRaw', 'gunzip']; - -compressors.forEach(function (method) { - var name = 'zlib.' + method; - var el = { - name: name, - children: [], - before: 1, - after: 1, - error: 0 - }; - var list = [ el ]; - if (nodeVersion[0] >= 6) { - list.push(el); - } - - var children = [ - { - name: name, - // Compressors use streams internally, - // so there's a bunch of nested stuff. - children: [ - { - name: name, - children: [ - { - name: name, - children: list, - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ] - if (nodeVersion[0] >= 9) { - children.unshift({ - name: name, - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - test('test ' + name, function (t) { - test_helper(t, function (listener, done) { - listener.currentName = name; - zlib[method](new Buffer('Goodbye World'), done); - }, { - name: 'root', - children: children, - before: 0, - after: 0, - error: 0 - }); - }); -}); - -decompressors.forEach(function (method, i) { - var preMethod = compressors[i]; - var name = 'zlib.' + method; - var el = { - name: name, - children: [], - before: 1, - after: 1, - error: 0 - }; - var list = [ el ]; - if (nodeVersion[0] >= 6) { - list.push(el); - } - - var children = [ - { - name: name, - // Compressors use streams internally, - // so there's a bunch of nested stuff. - children: [ - { - name: name, - children: [ - { - name: name, - children: list, - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ], - before: 1, - after: 1, - error: 0 - } - ] - if (nodeVersion[0] >= 9) { - children.unshift({ - name: name, - children: [], - before: 1, - after: 1, - error: 0 - }) - } - - test('test ' + name, function (t) { - zlib[preMethod](new Buffer('Goodbye World'), function (err, buf) { - t.ok(!err, 'should not have errored in preparation') - test_helper(t, function (listener, done) { - listener.currentName = name; - zlib[method](buf, done); - }, { - name: 'root', - children: children, - before: 0, - after: 0, - error: 0 - }); - }); - }); -}); - -function test_helper (t, run, expect) { - // Trigger callback out-of-band from async listener - var args; - var interval = setInterval(function () { - if (args) { - clearInterval(interval); - t.ok(!args[0], 'should not have errored'); - t.deepEqual(listener.root, expect); - t.end(); - } - }, 5); - - var listener = addListner(); - run(listener, function () { - args = Array.prototype.slice.call(arguments); - }); - process.removeAsyncListener(listener.listener); -} - -function addListner() { - var listener = process.addAsyncListener({ - create: create, - before: before, - after: after, - error: error - }); - - - var state = { - listener: listener, - currentName: 'root' - }; - - state.root = create(); - state.current = state.root; - - return state; - - function create () { - var node = { - name: state.currentName, - children: [], - before: 0, - after: 0, - error: 0 - }; - - if(state.current) state.current.children.push(node); - return node; - } - - function before(ctx, node) { - state.current = node; - state.current.before++; - } - - function after(ctx, node) { - node.after++; - state.current = null; - } - - function error(ctx, node) { - node.error++; - state.current = null; - return false; - } -} diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c3..0000000 --- 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 2cdc8e4..0000000 --- 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 08e918c..0000000 --- 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 1685a76..0000000 --- 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 b871986..0000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "balanced-match@1.0.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_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": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de32266..0000000 --- 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 6b4e0e1..0000000 --- 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 0478be8..0000000 --- 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 405d80a..0000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "brace-expansion@1.1.11", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_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": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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/browser-stdout/LICENSE b/node_modules/browser-stdout/LICENSE deleted file mode 100644 index 775f6ce..0000000 --- a/node_modules/browser-stdout/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright 2018 kumavis - -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/browser-stdout/README.md b/node_modules/browser-stdout/README.md deleted file mode 100644 index f32028a..0000000 --- a/node_modules/browser-stdout/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### wat? - -`process.stdout` in your browser. - -### wai? - -iono. cuz hakz. - -### hau? - -```js -var BrowserStdout = require('browser-stdout') - -myStream.pipe(BrowserStdout()) -``` - -### monkey - -You can monkey-patch `process.stdout` for your dependency graph like this: - -``` -process.stdout = require('browser-stdout')() -var coolTool = require('module-that-uses-stdout-somewhere-in-its-depths') -``` - -### opts - -opts are passed directly to `stream.Writable`. -additionally, a label arg can be used to label console output. - -```js -BrowserStdout({ - objectMode: true, - label: 'dataz', -}) -``` - -### ur doin it rong - -i accept pr's. \ No newline at end of file diff --git a/node_modules/browser-stdout/index.js b/node_modules/browser-stdout/index.js deleted file mode 100644 index daf39c3..0000000 --- a/node_modules/browser-stdout/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var WritableStream = require('stream').Writable -var inherits = require('util').inherits - -module.exports = BrowserStdout - - -inherits(BrowserStdout, WritableStream) - -function BrowserStdout(opts) { - if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) - - opts = opts || {} - WritableStream.call(this, opts) - this.label = (opts.label !== undefined) ? opts.label : 'stdout' -} - -BrowserStdout.prototype._write = function(chunks, encoding, cb) { - var output = chunks.toString ? chunks.toString() : chunks - if (this.label === false) { - console.log(output) - } else { - console.log(this.label+':', output) - } - process.nextTick(cb) -} diff --git a/node_modules/browser-stdout/package.json b/node_modules/browser-stdout/package.json deleted file mode 100644 index 05c249e..0000000 --- a/node_modules/browser-stdout/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_args": [ - [ - "browser-stdout@1.3.1", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "browser-stdout@1.3.1", - "_id": "browser-stdout@1.3.1", - "_inBundle": false, - "_integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "_location": "/browser-stdout", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "browser-stdout@1.3.1", - "name": "browser-stdout", - "escapedName": "browser-stdout", - "rawSpec": "1.3.1", - "saveSpec": null, - "fetchSpec": "1.3.1" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "_spec": "1.3.1", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "kumavis" - }, - "bugs": { - "url": "https://github.com/kumavis/browser-stdout/issues" - }, - "description": "`process.stdout` in your browser.", - "homepage": "https://github.com/kumavis/browser-stdout#readme", - "license": "ISC", - "main": "index.js", - "name": "browser-stdout", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kumavis/browser-stdout.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.3.1" -} diff --git a/node_modules/buffer-from/LICENSE b/node_modules/buffer-from/LICENSE deleted file mode 100644 index e4bf1d6..0000000 --- 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 d92a83d..0000000 --- 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 3872a0b..0000000 --- a/node_modules/buffer-from/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_args": [ - [ - "buffer-from@1.1.1", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_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" - ], - "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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 9880a55..0000000 --- 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/callsite/.npmignore b/node_modules/callsite/.npmignore deleted file mode 100644 index f1250e5..0000000 --- a/node_modules/callsite/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/callsite/History.md b/node_modules/callsite/History.md deleted file mode 100644 index 4994198..0000000 --- a/node_modules/callsite/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -1.0.0 / 2013-01-24 -================== - - * remove lame magical getters - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/callsite/Makefile b/node_modules/callsite/Makefile deleted file mode 100644 index 634e372..0000000 --- a/node_modules/callsite/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/callsite/Readme.md b/node_modules/callsite/Readme.md deleted file mode 100644 index 0dbd16a..0000000 --- a/node_modules/callsite/Readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# callstack - - Access to v8's "raw" `CallSite`s. - -## Installation - - $ npm install callsite - -## Example - -```js -var stack = require('callsite'); - -foo(); - -function foo() { - bar(); -} - -function bar() { - baz(); -} - -function baz() { - console.log(); - stack().forEach(function(site){ - console.log(' \033[36m%s\033[90m in %s:%d\033[0m' - , site.getFunctionName() || 'anonymous' - , site.getFileName() - , site.getLineNumber()); - }); - console.log(); -} -``` - -## Why? - - Because you can do weird, stupid, clever, wacky things such as: - - - [better-assert](https://github.com/visionmedia/better-assert) - -## License - - MIT diff --git a/node_modules/callsite/index.js b/node_modules/callsite/index.js deleted file mode 100644 index d3ee6f8..0000000 --- a/node_modules/callsite/index.js +++ /dev/null @@ -1,10 +0,0 @@ - -module.exports = function(){ - var orig = Error.prepareStackTrace; - Error.prepareStackTrace = function(_, stack){ return stack; }; - var err = new Error; - Error.captureStackTrace(err, arguments.callee); - var stack = err.stack; - Error.prepareStackTrace = orig; - return stack; -}; diff --git a/node_modules/callsite/package.json b/node_modules/callsite/package.json deleted file mode 100644 index a6f280d..0000000 --- a/node_modules/callsite/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_args": [ - [ - "callsite@1.0.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "callsite@1.0.0", - "_id": "callsite@1.0.0", - "_inBundle": false, - "_integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "_location": "/callsite", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "callsite@1.0.0", - "name": "callsite", - "escapedName": "callsite", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/decache" - ], - "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "description": "access to v8's CallSites", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "engines": { - "node": "*" - }, - "keywords": [ - "stack", - "trace", - "line" - ], - "main": "index", - "name": "callsite", - "version": "1.0.0" -} diff --git a/node_modules/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069..0000000 --- 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 579f99b..0000000 --- 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 e7af2f7..0000000 --- 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 9f36990..0000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "camelcase@5.3.1", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_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": [ - "/yargs-parser", - "/yargs-unparser/yargs-parser" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "_spec": "5.3.1", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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 fde2726..0000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - - - ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`
-Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js deleted file mode 100644 index 1cc5fa8..0000000 --- a/node_modules/chalk/index.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); -const ansiStyles = require('ansi-styles'); -const stdoutColor = require('supports-color').stdout; - -const template = require('./templates.js'); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 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 622caaa..0000000 --- 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 e7af2f7..0000000 --- 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/node_modules/supports-color/browser.js b/node_modules/chalk/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a..0000000 --- a/node_modules/chalk/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/chalk/node_modules/supports-color/index.js b/node_modules/chalk/node_modules/supports-color/index.js deleted file mode 100644 index 1704131..0000000 --- a/node_modules/chalk/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - 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 !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - 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; - } - - if (env.TERM === 'dumb') { - return min; - } - - 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/chalk/node_modules/supports-color/license b/node_modules/chalk/node_modules/supports-color/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/chalk/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/chalk/node_modules/supports-color/package.json b/node_modules/chalk/node_modules/supports-color/package.json deleted file mode 100644 index cd39d9e..0000000 --- a/node_modules/chalk/node_modules/supports-color/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "supports-color@5.5.0", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_development": true, - "_from": "supports-color@5.5.0", - "_id": "supports-color@5.5.0", - "_inBundle": false, - "_integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "_location": "/chalk/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "supports-color@5.5.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "5.5.0", - "saveSpec": null, - "fetchSpec": "5.5.0" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "_spec": "5.5.0", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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.20.0" - }, - "engines": { - "node": ">=4" - }, - "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": "5.5.0" -} diff --git a/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/chalk/node_modules/supports-color/readme.md deleted file mode 100644 index f6e4019..0000000 --- a/node_modules/chalk/node_modules/supports-color/readme.md +++ /dev/null @@ -1,66 +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 - - -## 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. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` 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. - - -## 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/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index f397082..0000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - "chalk@2.4.2", - "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode" - ] - ], - "_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": { - "has-flag": "3.0.0" - }, - "_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": [ - "/log-symbols" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "_spec": "2.4.2", - "_where": "C:\\Users\\peter\\Desktop\\dl\\AREPL-vscode", - "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 d298e2c..0000000 --- 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.`
- - 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. -
-