From d002126b72478c5ec9cb2880274b589c1299bc1f Mon Sep 17 00:00:00 2001 From: s2 Date: Sun, 3 Jun 2018 13:47:11 +0200 Subject: [PATCH] add node modules to repo --- app/node_modules/.bin/asar | 16 +- app/node_modules/.bin/asar.cmd | 7 - app/node_modules/.bin/decompress-zip | 16 +- app/node_modules/.bin/decompress-zip.cmd | 7 - app/node_modules/.bin/electron | 1 + app/node_modules/.bin/electron-download | 1 + app/node_modules/.bin/electron-osx-flat | 16 +- app/node_modules/.bin/electron-osx-flat.cmd | 7 - app/node_modules/.bin/electron-osx-sign | 16 +- app/node_modules/.bin/electron-osx-sign.cmd | 7 - app/node_modules/.bin/electron-packager | 16 +- app/node_modules/.bin/electron-packager.cmd | 7 - app/node_modules/.bin/extract-zip | 1 + app/node_modules/.bin/mkdirp | 1 + app/node_modules/.bin/nopt | 16 +- app/node_modules/.bin/nopt.cmd | 7 - app/node_modules/.bin/nugget | 1 + app/node_modules/.bin/pretty-bytes | 1 + app/node_modules/.bin/rc | 1 + app/node_modules/.bin/rimraf | 1 + app/node_modules/.bin/semver | 1 + app/node_modules/.bin/sshpk-conv | 1 + app/node_modules/.bin/sshpk-sign | 1 + app/node_modules/.bin/sshpk-verify | 1 + app/node_modules/.bin/strip-indent | 1 + app/node_modules/.bin/uuid | 1 + app/node_modules/@types/node/LICENSE | 21 + app/node_modules/@types/node/README.md | 16 + app/node_modules/@types/node/index.d.ts | 7219 +++++++++++++ app/node_modules/@types/node/inspector.d.ts | 2488 +++++ app/node_modules/@types/node/package.json | 139 + app/node_modules/abbrev/package.json | 24 +- app/node_modules/ajv/.tonic_example.js | 20 + app/node_modules/ajv/LICENSE | 22 + app/node_modules/ajv/README.md | 1327 +++ app/node_modules/ajv/lib/$data.js | 49 + app/node_modules/ajv/lib/ajv.d.ts | 358 + app/node_modules/ajv/lib/ajv.js | 502 + app/node_modules/ajv/lib/cache.js | 26 + app/node_modules/ajv/lib/compile/_rules.js | 31 + app/node_modules/ajv/lib/compile/async.js | 90 + app/node_modules/ajv/lib/compile/equal.js | 3 + .../ajv/lib/compile/error_classes.js | 34 + app/node_modules/ajv/lib/compile/formats.js | 135 + app/node_modules/ajv/lib/compile/index.js | 380 + app/node_modules/ajv/lib/compile/resolve.js | 271 + app/node_modules/ajv/lib/compile/rules.js | 58 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + app/node_modules/ajv/lib/compile/util.js | 267 + app/node_modules/ajv/lib/dot/_limit.jst | 96 + app/node_modules/ajv/lib/dot/_limitItems.jst | 10 + app/node_modules/ajv/lib/dot/_limitLength.jst | 10 + .../ajv/lib/dot/_limitProperties.jst | 10 + app/node_modules/ajv/lib/dot/allOf.jst | 34 + app/node_modules/ajv/lib/dot/anyOf.jst | 48 + app/node_modules/ajv/lib/dot/coerce.def | 61 + app/node_modules/ajv/lib/dot/const.jst | 11 + app/node_modules/ajv/lib/dot/contains.jst | 57 + app/node_modules/ajv/lib/dot/custom.jst | 191 + app/node_modules/ajv/lib/dot/defaults.def | 32 + app/node_modules/ajv/lib/dot/definitions.def | 199 + app/node_modules/ajv/lib/dot/dependencies.jst | 80 + app/node_modules/ajv/lib/dot/enum.jst | 30 + app/node_modules/ajv/lib/dot/errors.def | 194 + app/node_modules/ajv/lib/dot/format.jst | 106 + app/node_modules/ajv/lib/dot/items.jst | 100 + app/node_modules/ajv/lib/dot/missing.def | 39 + app/node_modules/ajv/lib/dot/multipleOf.jst | 20 + app/node_modules/ajv/lib/dot/not.jst | 43 + app/node_modules/ajv/lib/dot/oneOf.jst | 44 + app/node_modules/ajv/lib/dot/pattern.jst | 14 + app/node_modules/ajv/lib/dot/properties.jst | 327 + .../ajv/lib/dot/propertyNames.jst | 54 + app/node_modules/ajv/lib/dot/ref.jst | 85 + app/node_modules/ajv/lib/dot/required.jst | 108 + app/node_modules/ajv/lib/dot/uniqueItems.jst | 38 + app/node_modules/ajv/lib/dot/validate.jst | 272 + app/node_modules/ajv/lib/dotjs/README.md | 3 + app/node_modules/ajv/lib/dotjs/_limit.js | 149 + app/node_modules/ajv/lib/dotjs/_limitItems.js | 76 + .../ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + app/node_modules/ajv/lib/dotjs/allOf.js | 43 + app/node_modules/ajv/lib/dotjs/anyOf.js | 73 + app/node_modules/ajv/lib/dotjs/const.js | 55 + app/node_modules/ajv/lib/dotjs/contains.js | 81 + app/node_modules/ajv/lib/dotjs/custom.js | 226 + .../ajv/lib/dotjs/dependencies.js | 167 + app/node_modules/ajv/lib/dotjs/enum.js | 65 + app/node_modules/ajv/lib/dotjs/format.js | 149 + app/node_modules/ajv/lib/dotjs/items.js | 140 + app/node_modules/ajv/lib/dotjs/multipleOf.js | 76 + app/node_modules/ajv/lib/dotjs/not.js | 83 + app/node_modules/ajv/lib/dotjs/oneOf.js | 70 + app/node_modules/ajv/lib/dotjs/pattern.js | 74 + app/node_modules/ajv/lib/dotjs/properties.js | 468 + .../ajv/lib/dotjs/propertyNames.js | 81 + app/node_modules/ajv/lib/dotjs/ref.js | 123 + app/node_modules/ajv/lib/dotjs/required.js | 268 + app/node_modules/ajv/lib/dotjs/uniqueItems.js | 71 + app/node_modules/ajv/lib/dotjs/validate.js | 458 + app/node_modules/ajv/lib/keyword.js | 135 + app/node_modules/ajv/lib/patternGroups.js | 36 + app/node_modules/ajv/lib/refs/$data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + .../ajv/lib/refs/json-schema-v5.json | 250 + app/node_modules/ajv/package.json | 134 + app/node_modules/ajv/scripts/.eslintrc.yml | 3 + app/node_modules/ajv/scripts/bundle.js | 61 + app/node_modules/ajv/scripts/compile-dots.js | 73 + app/node_modules/ajv/scripts/info | 10 + app/node_modules/ajv/scripts/prepare-tests | 9 + app/node_modules/ajv/scripts/travis-gh-pages | 23 + app/node_modules/ansi-regex/index.js | 4 + app/node_modules/ansi-regex/license | 21 + app/node_modules/ansi-regex/package.json | 112 + app/node_modules/ansi-regex/readme.md | 39 + app/node_modules/array-find-index/index.js | 25 + app/node_modules/array-find-index/license | 21 + .../array-find-index/package.json | 71 + app/node_modules/array-find-index/readme.md | 30 + app/node_modules/asar/bin/asar.js | 0 .../asar/node_modules/glob/package.json | 24 +- app/node_modules/asar/package.json | 24 +- app/node_modules/asn1/.npmignore | 2 + app/node_modules/asn1/.travis.yml | 4 + app/node_modules/asn1/LICENSE | 19 + app/node_modules/asn1/README.md | 50 + app/node_modules/asn1/lib/ber/errors.js | 13 + app/node_modules/asn1/lib/ber/index.js | 27 + app/node_modules/asn1/lib/ber/reader.js | 261 + app/node_modules/asn1/lib/ber/types.js | 36 + app/node_modules/asn1/lib/ber/writer.js | 316 + app/node_modules/asn1/lib/index.js | 20 + app/node_modules/asn1/package.json | 69 + app/node_modules/asn1/tst/ber/reader.test.js | 208 + app/node_modules/asn1/tst/ber/writer.test.js | 370 + app/node_modules/assert-plus/AUTHORS | 6 + app/node_modules/assert-plus/CHANGES.md | 14 + app/node_modules/assert-plus/README.md | 162 + app/node_modules/assert-plus/assert.js | 211 + app/node_modules/assert-plus/package.json | 91 + app/node_modules/asynckit/LICENSE | 21 + app/node_modules/asynckit/README.md | 233 + app/node_modules/asynckit/bench.js | 76 + app/node_modules/asynckit/index.js | 6 + app/node_modules/asynckit/lib/abort.js | 29 + app/node_modules/asynckit/lib/async.js | 34 + app/node_modules/asynckit/lib/defer.js | 26 + app/node_modules/asynckit/lib/iterate.js | 75 + .../asynckit/lib/readable_asynckit.js | 91 + .../asynckit/lib/readable_parallel.js | 25 + .../asynckit/lib/readable_serial.js | 25 + .../asynckit/lib/readable_serial_ordered.js | 29 + app/node_modules/asynckit/lib/state.js | 37 + app/node_modules/asynckit/lib/streamify.js | 141 + app/node_modules/asynckit/lib/terminator.js | 29 + app/node_modules/asynckit/package.json | 95 + app/node_modules/asynckit/parallel.js | 43 + app/node_modules/asynckit/serial.js | 17 + app/node_modules/asynckit/serialOrdered.js | 75 + app/node_modules/asynckit/stream.js | 21 + app/node_modules/author-regex/package.json | 24 +- app/node_modules/aws-sign2/LICENSE | 55 + app/node_modules/aws-sign2/README.md | 4 + app/node_modules/aws-sign2/index.js | 212 + app/node_modules/aws-sign2/package.json | 54 + app/node_modules/aws4/.travis.yml | 5 + app/node_modules/aws4/LICENSE | 19 + app/node_modules/aws4/README.md | 523 + app/node_modules/aws4/aws4.js | 332 + app/node_modules/aws4/lru.js | 96 + app/node_modules/aws4/package.json | 108 + app/node_modules/balanced-match/.npmignore | 5 + app/node_modules/balanced-match/LICENSE.md | 21 + app/node_modules/balanced-match/README.md | 91 + app/node_modules/balanced-match/index.js | 59 + app/node_modules/balanced-match/package.json | 81 + app/node_modules/base64-js/package.json | 14 +- app/node_modules/bcrypt-pbkdf/README.md | 39 + app/node_modules/bcrypt-pbkdf/index.js | 556 + app/node_modules/bcrypt-pbkdf/package.json | 41 + app/node_modules/binary/package.json | 27 +- app/node_modules/bluebird/package.json | 24 +- app/node_modules/boom/LICENSE | 29 + app/node_modules/boom/README.md | 760 ++ app/node_modules/boom/lib/index.js | 433 + app/node_modules/boom/package.json | 65 + app/node_modules/bootstrap/LICENSE | 22 + app/node_modules/bootstrap/README.md | 171 + app/node_modules/bootstrap/js/src/alert.js | 183 + app/node_modules/bootstrap/js/src/button.js | 175 + app/node_modules/bootstrap/js/src/carousel.js | 517 + app/node_modules/bootstrap/js/src/collapse.js | 394 + app/node_modules/bootstrap/js/src/dropdown.js | 487 + app/node_modules/bootstrap/js/src/index.js | 50 + app/node_modules/bootstrap/js/src/modal.js | 579 ++ app/node_modules/bootstrap/js/src/popover.js | 188 + .../bootstrap/js/src/scrollspy.js | 329 + app/node_modules/bootstrap/js/src/tab.js | 263 + app/node_modules/bootstrap/js/src/tooltip.js | 723 ++ app/node_modules/bootstrap/js/src/util.js | 153 + app/node_modules/bootstrap/package.json | 251 + app/node_modules/bootstrap/scss/_alert.scss | 51 + app/node_modules/bootstrap/scss/_badge.scss | 47 + .../bootstrap/scss/_breadcrumb.scss | 41 + .../bootstrap/scss/_button-group.scss | 172 + app/node_modules/bootstrap/scss/_buttons.scss | 144 + app/node_modules/bootstrap/scss/_card.scss | 301 + .../bootstrap/scss/_carousel.scss | 236 + app/node_modules/bootstrap/scss/_close.scss | 34 + app/node_modules/bootstrap/scss/_code.scss | 48 + .../bootstrap/scss/_custom-forms.scss | 421 + .../bootstrap/scss/_dropdown.scss | 166 + app/node_modules/bootstrap/scss/_forms.scss | 335 + .../bootstrap/scss/_functions.scss | 86 + app/node_modules/bootstrap/scss/_grid.scss | 52 + app/node_modules/bootstrap/scss/_images.scss | 42 + .../bootstrap/scss/_input-group.scss | 158 + .../bootstrap/scss/_jumbotron.scss | 16 + .../bootstrap/scss/_list-group.scss | 115 + app/node_modules/bootstrap/scss/_media.scss | 8 + app/node_modules/bootstrap/scss/_mixins.scss | 41 + app/node_modules/bootstrap/scss/_modal.scss | 168 + app/node_modules/bootstrap/scss/_nav.scss | 118 + app/node_modules/bootstrap/scss/_navbar.scss | 299 + .../bootstrap/scss/_pagination.scss | 78 + app/node_modules/bootstrap/scss/_popover.scss | 183 + app/node_modules/bootstrap/scss/_print.scss | 141 + .../bootstrap/scss/_progress.scss | 34 + app/node_modules/bootstrap/scss/_reboot.scss | 480 + app/node_modules/bootstrap/scss/_root.scss | 19 + app/node_modules/bootstrap/scss/_tables.scss | 188 + app/node_modules/bootstrap/scss/_tooltip.scss | 115 + .../bootstrap/scss/_transitions.scss | 22 + app/node_modules/bootstrap/scss/_type.scss | 125 + .../bootstrap/scss/_utilities.scss | 15 + .../bootstrap/scss/_variables.scss | 929 ++ .../bootstrap/scss/bootstrap-grid.scss | 32 + .../bootstrap/scss/bootstrap-reboot.scss | 12 + .../bootstrap/scss/bootstrap.scss | 42 + .../bootstrap/scss/mixins/_alert.scss | 13 + .../scss/mixins/_background-variant.scss | 21 + .../bootstrap/scss/mixins/_badge.scss | 12 + .../bootstrap/scss/mixins/_border-radius.scss | 35 + .../bootstrap/scss/mixins/_box-shadow.scss | 5 + .../bootstrap/scss/mixins/_breakpoints.scss | 123 + .../bootstrap/scss/mixins/_buttons.scss | 109 + .../bootstrap/scss/mixins/_caret.scss | 66 + .../bootstrap/scss/mixins/_clearfix.scss | 7 + .../bootstrap/scss/mixins/_float.scss | 11 + .../bootstrap/scss/mixins/_forms.scss | 147 + .../bootstrap/scss/mixins/_gradients.scss | 45 + .../scss/mixins/_grid-framework.scss | 67 + .../bootstrap/scss/mixins/_grid.scss | 52 + .../bootstrap/scss/mixins/_hover.scss | 37 + .../bootstrap/scss/mixins/_image.scss | 36 + .../bootstrap/scss/mixins/_list-group.scss | 21 + .../bootstrap/scss/mixins/_lists.scss | 7 + .../bootstrap/scss/mixins/_nav-divider.scss | 10 + .../bootstrap/scss/mixins/_pagination.scss | 22 + .../bootstrap/scss/mixins/_reset-text.scss | 17 + .../bootstrap/scss/mixins/_resize.scss | 6 + .../bootstrap/scss/mixins/_screen-reader.scss | 33 + .../bootstrap/scss/mixins/_size.scss | 6 + .../bootstrap/scss/mixins/_table-row.scss | 30 + .../bootstrap/scss/mixins/_text-emphasis.scss | 14 + .../bootstrap/scss/mixins/_text-hide.scss | 13 + .../bootstrap/scss/mixins/_text-truncate.scss | 8 + .../bootstrap/scss/mixins/_transition.scss | 13 + .../bootstrap/scss/mixins/_visibility.scss | 7 + .../bootstrap/scss/utilities/_align.scss | 8 + .../bootstrap/scss/utilities/_background.scss | 19 + .../bootstrap/scss/utilities/_borders.scss | 59 + .../bootstrap/scss/utilities/_clearfix.scss | 3 + .../bootstrap/scss/utilities/_display.scss | 38 + .../bootstrap/scss/utilities/_embed.scss | 52 + .../bootstrap/scss/utilities/_flex.scss | 51 + .../bootstrap/scss/utilities/_float.scss | 9 + .../bootstrap/scss/utilities/_position.scss | 37 + .../scss/utilities/_screenreaders.scss | 11 + .../bootstrap/scss/utilities/_shadows.scss | 6 + .../bootstrap/scss/utilities/_sizing.scss | 12 + .../bootstrap/scss/utilities/_spacing.scss | 51 + .../bootstrap/scss/utilities/_text.scss | 58 + .../bootstrap/scss/utilities/_visibility.scss | 11 + app/node_modules/brace-expansion/LICENSE | 21 + app/node_modules/brace-expansion/README.md | 129 + app/node_modules/brace-expansion/index.js | 201 + app/node_modules/brace-expansion/package.json | 79 + app/node_modules/buffers/package.json | 24 +- .../builtin-modules/builtin-modules.json | 35 + app/node_modules/builtin-modules/index.js | 10 + app/node_modules/builtin-modules/license | 21 + app/node_modules/builtin-modules/package.json | 76 + app/node_modules/builtin-modules/readme.md | 41 + app/node_modules/builtin-modules/static.js | 2 + app/node_modules/camelcase-keys/index.js | 12 + app/node_modules/camelcase-keys/license | 21 + app/node_modules/camelcase-keys/package.json | 88 + app/node_modules/camelcase-keys/readme.md | 54 + app/node_modules/camelcase/index.js | 56 + app/node_modules/camelcase/license | 21 + app/node_modules/camelcase/package.json | 75 + app/node_modules/camelcase/readme.md | 57 + app/node_modules/caseless/LICENSE | 28 + app/node_modules/caseless/README.md | 45 + app/node_modules/caseless/index.js | 67 + app/node_modules/caseless/package.json | 60 + app/node_modules/caseless/test.js | 67 + app/node_modules/chainsaw/index.js | 0 app/node_modules/chainsaw/package.json | 27 +- .../chromium-pickle-js/package.json | 24 +- app/node_modules/co/History.md | 172 + app/node_modules/co/LICENSE | 22 + app/node_modules/co/Readme.md | 212 + app/node_modules/co/index.js | 237 + app/node_modules/co/package.json | 70 + app/node_modules/code-point-at/index.js | 32 + app/node_modules/code-point-at/license | 21 + app/node_modules/code-point-at/package.json | 74 + app/node_modules/code-point-at/readme.md | 32 + app/node_modules/combined-stream/License | 19 + app/node_modules/combined-stream/Readme.md | 138 + .../combined-stream/lib/combined_stream.js | 189 + app/node_modules/combined-stream/lib/defer.js | 26 + app/node_modules/combined-stream/package.json | 62 + app/node_modules/commander/package.json | 24 +- app/node_modules/compare-version/package.json | 24 +- app/node_modules/concat-map/.travis.yml | 4 + app/node_modules/concat-map/LICENSE | 18 + app/node_modules/concat-map/README.markdown | 62 + app/node_modules/concat-map/example/map.js | 6 + app/node_modules/concat-map/index.js | 13 + app/node_modules/concat-map/package.json | 92 + app/node_modules/concat-map/test/map.js | 39 + app/node_modules/concat-stream/LICENSE | 24 + app/node_modules/concat-stream/index.js | 143 + .../node_modules/isarray/.npmignore | 1 + .../node_modules/isarray/.travis.yml | 4 + .../node_modules/isarray/Makefile | 6 + .../node_modules/isarray/README.md | 60 + .../node_modules/isarray/component.json | 19 + .../node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 77 + .../node_modules/isarray/test.js | 20 + .../node_modules/readable-stream/.travis.yml | 55 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 58 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 131 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1019 ++ .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 687 ++ .../lib/internal/streams/BufferList.js | 79 + .../lib/internal/streams/destroy.js | 74 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 85 + .../readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + .../node_modules/readable-stream/readable.js | 19 + .../node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + .../node_modules/readable-stream/writable.js | 8 + .../node_modules/string_decoder/.travis.yml | 50 + .../node_modules/string_decoder/LICENSE | 48 + .../node_modules/string_decoder/README.md | 47 + .../string_decoder/lib/string_decoder.js | 296 + .../node_modules/string_decoder/package.json | 63 + app/node_modules/concat-stream/package.json | 93 + app/node_modules/concat-stream/readme.md | 102 + app/node_modules/core-util-is/LICENSE | 19 + app/node_modules/core-util-is/README.md | 3 + app/node_modules/core-util-is/float.patch | 604 ++ app/node_modules/core-util-is/lib/util.js | 107 + app/node_modules/core-util-is/package.json | 68 + app/node_modules/core-util-is/test.js | 68 + app/node_modules/cryptiles/.npmignore | 3 + app/node_modules/cryptiles/LICENSE | 28 + app/node_modules/cryptiles/README.md | 19 + app/node_modules/cryptiles/lib/index.js | 88 + .../cryptiles/node_modules/boom/LICENSE | 29 + .../cryptiles/node_modules/boom/README.md | 784 ++ .../cryptiles/node_modules/boom/lib/index.js | 457 + .../cryptiles/node_modules/boom/package.json | 65 + app/node_modules/cryptiles/package.json | 65 + app/node_modules/cuint/package.json | 24 +- .../currently-unhandled/browser.js | 27 + app/node_modules/currently-unhandled/core.js | 33 + app/node_modules/currently-unhandled/index.js | 12 + app/node_modules/currently-unhandled/license | 21 + .../currently-unhandled/package.json | 107 + .../currently-unhandled/readme.md | 44 + app/node_modules/dashdash/CHANGES.md | 364 + app/node_modules/dashdash/LICENSE.txt | 24 + app/node_modules/dashdash/README.md | 574 ++ .../dashdash/etc/dashdash.bash_completion.in | 389 + app/node_modules/dashdash/lib/dashdash.js | 1055 ++ app/node_modules/dashdash/package.json | 71 + app/node_modules/debug/.coveralls.yml | 1 + app/node_modules/debug/.eslintrc | 11 + app/node_modules/debug/.npmignore | 9 + app/node_modules/debug/.travis.yml | 14 + app/node_modules/debug/CHANGELOG.md | 362 + app/node_modules/debug/LICENSE | 19 + app/node_modules/debug/Makefile | 50 + app/node_modules/debug/README.md | 312 + app/node_modules/debug/component.json | 19 + app/node_modules/debug/karma.conf.js | 70 + app/node_modules/debug/node.js | 1 + app/node_modules/debug/package.json | 97 + app/node_modules/debug/src/browser.js | 185 + app/node_modules/debug/src/debug.js | 202 + app/node_modules/debug/src/index.js | 10 + app/node_modules/debug/src/inspector-log.js | 15 + app/node_modules/debug/src/node.js | 248 + app/node_modules/decamelize/index.js | 13 + app/node_modules/decamelize/license | 21 + app/node_modules/decamelize/package.json | 74 + app/node_modules/decamelize/readme.md | 48 + .../decompress-zip/bin/decompress-zip | 0 app/node_modules/decompress-zip/package.json | 14 +- app/node_modules/deep-extend/CHANGELOG.md | 38 + app/node_modules/deep-extend/LICENSE | 20 + app/node_modules/deep-extend/README.md | 93 + app/node_modules/deep-extend/index.js | 1 + .../deep-extend/lib/deep-extend.js | 150 + app/node_modules/deep-extend/package.json | 97 + app/node_modules/delayed-stream/.npmignore | 1 + app/node_modules/delayed-stream/License | 19 + app/node_modules/delayed-stream/Makefile | 7 + app/node_modules/delayed-stream/Readme.md | 141 + .../delayed-stream/lib/delayed_stream.js | 107 + app/node_modules/delayed-stream/package.json | 66 + app/node_modules/ecc-jsbn/.npmignore | 15 + app/node_modules/ecc-jsbn/LICENSE | 21 + app/node_modules/ecc-jsbn/README.md | 8 + app/node_modules/ecc-jsbn/index.js | 57 + app/node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 + app/node_modules/ecc-jsbn/lib/ec.js | 561 ++ app/node_modules/ecc-jsbn/lib/sec.js | 170 + app/node_modules/ecc-jsbn/package.json | 69 + app/node_modules/ecc-jsbn/test.js | 14 + app/node_modules/ejs/Jakefile | 70 + app/node_modules/ejs/LICENSE | 202 + app/node_modules/ejs/README.md | 269 + app/node_modules/ejs/ejs.js | 1571 +++ app/node_modules/ejs/ejs.min.js | 1 + app/node_modules/ejs/lib/ejs.js | 939 ++ app/node_modules/ejs/lib/utils.js | 164 + app/node_modules/ejs/package.json | 82 + .../electron-download/build/cli.js | 19 + .../electron-download/build/index.js | 353 + .../electron-download/collaborators.md | 8 + .../electron-download/package.json | 96 + app/node_modules/electron-download/readme.md | 65 + .../electron-in-page-search/LICENSE | 21 + .../electron-in-page-search/README.md | 280 + .../example/browser-window/index.html | 35 + .../example/browser-window/main.js | 15 + .../example/browser-window/package.json | 17 + .../example/browser-window/renderer.js | 16 + .../example/browser-window/style.css | 29 + .../example/webview/index.html | 18 + .../example/webview/main.js | 15 + .../example/webview/package.json | 17 + .../example/webview/renderer.js | 20 + .../example/webview/style.css | 35 + .../example/webview/webview-content.html | 31 + .../electron-in-page-search/index.d.ts | 39 + .../electron-in-page-search/package.json | 71 + .../src/default-style.css | 59 + .../electron-in-page-search/src/index.js | 326 + .../electron-in-page-search/src/index.js.map | 1 + .../electron-in-page-search/src/index.ts | 366 + .../src/search-window.html | 17 + .../src/search-window.js | 78 + .../src/search-window.js.map | 1 + .../src/search-window.ts | 86 + .../test/smoke_browser_window_test.js | 133 + .../test/smoke_browser_window_test.js.map | 1 + .../test/smoke_browser_window_test.ts | 162 + .../test/smoke_webview_test.js | 139 + .../test/smoke_webview_test.js.map | 1 + .../test/smoke_webview_test.ts | 168 + .../electron-in-page-search/tsconfig.json | 21 + .../electron-is-accelerator/.jshintrc | 9 + .../electron-is-accelerator/.npmignore | 37 + .../electron-is-accelerator/.travis.yml | 4 + .../electron-is-accelerator/LICENSE | 21 + .../electron-is-accelerator/README.md | 25 + .../electron-is-accelerator/index.js | 21 + .../electron-is-accelerator/package.json | 57 + .../electron-is-accelerator/test.js | 96 + .../electron-localshortcut/README.md | 135 + .../electron-localshortcut/index.js | 302 + .../electron-localshortcut/license | 22 + .../electron-localshortcut/package.json | 78 + .../bin/electron-osx-flat.js | 0 .../bin/electron-osx-sign.js | 0 .../default.entitlements.mas.inherit.plist | 0 .../default.entitlements.mas.plist | 0 .../electron-osx-sign/package.json | 24 +- app/node_modules/electron-packager/cli.js | 0 .../node_modules/.bin/electron-download | 16 +- .../node_modules/.bin/electron-download.cmd | 7 - .../node_modules/debug/package.json | 24 +- .../node_modules/electron-download/lib/cli.js | 0 .../node_modules/debug/package.json | 24 +- .../node_modules/fs-extra/package.json | 24 +- .../electron-download/package.json | 24 +- .../node_modules/jsonfile/package.json | 24 +- .../node_modules/fs-extra/package.json | 24 +- .../node_modules/path-exists/package.json | 24 +- .../node_modules/pify/package.json | 24 +- .../node_modules/debug/package.json | 24 +- .../node_modules/sumchecker/package.json | 24 +- .../electron-packager/package.json | 27 +- .../test/ci/_before_script.js | 0 .../test/ci/before_install.sh | 0 app/node_modules/electron/LICENSE | 20 + app/node_modules/electron/README.md | 99 + app/node_modules/electron/cli.js | 10 + app/node_modules/electron/electron.d.ts | 8897 +++++++++++++++++ app/node_modules/electron/index.js | 10 + app/node_modules/electron/install.js | 64 + app/node_modules/electron/package.json | 73 + app/node_modules/electron/path.txt | 1 + app/node_modules/env-paths/package.json | 24 +- app/node_modules/error-ex/LICENSE | 21 + app/node_modules/error-ex/README.md | 144 + app/node_modules/error-ex/index.js | 133 + app/node_modules/error-ex/package.json | 90 + app/node_modules/es6-promise/CHANGELOG.md | 151 + app/node_modules/es6-promise/LICENSE | 19 + app/node_modules/es6-promise/README.md | 97 + app/node_modules/es6-promise/auto.js | 4 + app/node_modules/es6-promise/es6-promise.d.ts | 81 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 266 + .../es6-promise/lib/es6-promise/asap.js | 119 + .../es6-promise/lib/es6-promise/enumerator.js | 113 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 427 + .../lib/es6-promise/promise/all.js | 52 + .../lib/es6-promise/promise/race.js | 84 + .../lib/es6-promise/promise/reject.js | 46 + .../lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + app/node_modules/es6-promise/package.json | 108 + app/node_modules/extend/.eslintrc | 17 + app/node_modules/extend/.jscs.json | 175 + app/node_modules/extend/.npmignore | 1 + app/node_modules/extend/.travis.yml | 179 + app/node_modules/extend/CHANGELOG.md | 77 + app/node_modules/extend/LICENSE | 23 + app/node_modules/extend/README.md | 81 + app/node_modules/extend/component.json | 32 + app/node_modules/extend/index.js | 86 + app/node_modules/extend/package.json | 79 + app/node_modules/extract-zip/.npmignore | 1 + app/node_modules/extract-zip/.travis.yml | 7 + app/node_modules/extract-zip/CONTRIBUTING.md | 1 + app/node_modules/extract-zip/LICENSE | 23 + app/node_modules/extract-zip/cli.js | 20 + app/node_modules/extract-zip/index.js | 205 + app/node_modules/extract-zip/package.json | 74 + app/node_modules/extract-zip/readme.md | 49 + app/node_modules/extsprintf/.gitmodules | 0 app/node_modules/extsprintf/.npmignore | 2 + app/node_modules/extsprintf/LICENSE | 19 + app/node_modules/extsprintf/Makefile | 24 + app/node_modules/extsprintf/Makefile.targ | 285 + app/node_modules/extsprintf/README.md | 46 + app/node_modules/extsprintf/jsl.node.conf | 137 + app/node_modules/extsprintf/lib/extsprintf.js | 183 + app/node_modules/extsprintf/package.json | 48 + app/node_modules/fast-deep-equal/LICENSE | 21 + app/node_modules/fast-deep-equal/README.md | 55 + app/node_modules/fast-deep-equal/index.d.ts | 4 + app/node_modules/fast-deep-equal/index.js | 55 + app/node_modules/fast-deep-equal/package.json | 89 + .../fast-json-stable-stringify/.eslintrc.yml | 26 + .../fast-json-stable-stringify/.npmignore | 4 + .../fast-json-stable-stringify/.travis.yml | 8 + .../fast-json-stable-stringify/LICENSE | 18 + .../fast-json-stable-stringify/README.md | 119 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../fast-json-stable-stringify/example/str.js | 3 + .../example/value_cmp.js | 7 + .../fast-json-stable-stringify/index.js | 59 + .../fast-json-stable-stringify/package.json | 82 + .../fast-json-stable-stringify/test/cmp.js | 13 + .../fast-json-stable-stringify/test/nested.js | 44 + .../fast-json-stable-stringify/test/str.js | 46 + .../test/to-json.js | 22 + app/node_modules/fd-slicer/.npmignore | 2 + app/node_modules/fd-slicer/.travis.yml | 7 + app/node_modules/fd-slicer/CHANGELOG.md | 49 + app/node_modules/fd-slicer/LICENSE | 21 + app/node_modules/fd-slicer/README.md | 189 + app/node_modules/fd-slicer/index.js | 277 + app/node_modules/fd-slicer/package.json | 69 + app/node_modules/fd-slicer/test/test.js | 350 + app/node_modules/find-up/index.js | 53 + app/node_modules/find-up/license | 21 + app/node_modules/find-up/package.json | 87 + app/node_modules/find-up/readme.md | 72 + app/node_modules/flora-colossus/.npmignore | 2 +- app/node_modules/flora-colossus/.travis.yml | 12 +- app/node_modules/flora-colossus/README.md | 84 +- .../flora-colossus/lib/Walker.d.ts | 64 +- app/node_modules/flora-colossus/lib/Walker.js | 524 +- .../flora-colossus/lib/depTypes.d.ts | 18 +- .../flora-colossus/lib/depTypes.js | 182 +- .../flora-colossus/lib/index.d.ts | 4 +- app/node_modules/flora-colossus/lib/index.js | 14 +- .../node_modules/debug/package.json | 24 +- .../node_modules/fs-extra/package.json | 24 +- .../node_modules/jsonfile/package.json | 24 +- app/node_modules/flora-colossus/package.json | 24 +- app/node_modules/flora-colossus/tsconfig.json | 62 +- app/node_modules/flora-colossus/yarn.lock | 3042 +++--- app/node_modules/forever-agent/LICENSE | 55 + app/node_modules/forever-agent/README.md | 4 + app/node_modules/forever-agent/index.js | 138 + app/node_modules/forever-agent/package.json | 54 + app/node_modules/form-data/License | 19 + app/node_modules/form-data/README.md | 234 + app/node_modules/form-data/README.md.bak | 234 + app/node_modules/form-data/lib/browser.js | 2 + app/node_modules/form-data/lib/form_data.js | 457 + app/node_modules/form-data/lib/populate.js | 10 + app/node_modules/form-data/package.json | 102 + app/node_modules/fs-extra/.npmignore | 8 + app/node_modules/fs-extra/CHANGELOG.md | 553 + app/node_modules/fs-extra/LICENSE | 15 + app/node_modules/fs-extra/README.md | 588 ++ .../fs-extra/lib/copy-sync/copy-file-sync.js | 39 + .../fs-extra/lib/copy-sync/copy-sync.js | 48 + .../fs-extra/lib/copy-sync/index.js | 3 + app/node_modules/fs-extra/lib/copy/copy.js | 44 + app/node_modules/fs-extra/lib/copy/index.js | 3 + app/node_modules/fs-extra/lib/copy/ncp.js | 243 + app/node_modules/fs-extra/lib/empty/index.js | 47 + app/node_modules/fs-extra/lib/ensure/file.js | 43 + app/node_modules/fs-extra/lib/ensure/index.js | 21 + app/node_modules/fs-extra/lib/ensure/link.js | 58 + .../fs-extra/lib/ensure/symlink-paths.js | 97 + .../fs-extra/lib/ensure/symlink-type.js | 27 + .../fs-extra/lib/ensure/symlink.js | 62 + app/node_modules/fs-extra/lib/index.js | 37 + app/node_modules/fs-extra/lib/json/index.js | 9 + .../fs-extra/lib/json/jsonfile.js | 14 + .../fs-extra/lib/json/output-json-sync.js | 16 + .../fs-extra/lib/json/output-json.js | 24 + app/node_modules/fs-extra/lib/mkdirs/index.js | 9 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 57 + .../fs-extra/lib/mkdirs/mkdirs.js | 61 + app/node_modules/fs-extra/lib/mkdirs/win32.js | 24 + app/node_modules/fs-extra/lib/move/index.js | 161 + app/node_modules/fs-extra/lib/output/index.js | 35 + app/node_modules/fs-extra/lib/remove/index.js | 14 + app/node_modules/fs-extra/lib/util/assign.js | 14 + app/node_modules/fs-extra/lib/util/utimes.js | 69 + app/node_modules/fs-extra/lib/walk/index.js | 5 + app/node_modules/fs-extra/package.json | 96 + app/node_modules/fs.realpath/LICENSE | 43 + app/node_modules/fs.realpath/README.md | 33 + app/node_modules/fs.realpath/index.js | 66 + app/node_modules/fs.realpath/old.js | 303 + app/node_modules/fs.realpath/package.json | 63 + app/node_modules/galactus/.npmignore | 2 +- app/node_modules/galactus/README.md | 92 +- .../galactus/lib/DestroyerOfModules.d.ts | 36 +- .../galactus/lib/DestroyerOfModules.js | 326 +- app/node_modules/galactus/lib/index.d.ts | 4 +- app/node_modules/galactus/lib/index.js | 14 +- .../galactus/node_modules/debug/package.json | 24 +- .../node_modules/fs-extra/package.json | 24 +- .../node_modules/jsonfile/package.json | 24 +- app/node_modules/galactus/package.json | 24 +- app/node_modules/galactus/tsconfig.json | 62 +- app/node_modules/galactus/tslint.json | 24 +- app/node_modules/galactus/yarn.lock | 3108 +++--- .../node_modules/find-up/package.json | 24 +- .../node_modules/load-json-file/package.json | 24 +- .../node_modules/path-type/package.json | 24 +- .../node_modules/read-pkg-up/package.json | 24 +- .../node_modules/read-pkg/package.json | 24 +- .../node_modules/strip-bom/package.json | 24 +- .../get-package-info/package.json | 24 +- app/node_modules/get-stdin/index.js | 49 + app/node_modules/get-stdin/package.json | 72 + app/node_modules/get-stdin/readme.md | 44 + app/node_modules/getpass/.npmignore | 8 + app/node_modules/getpass/.travis.yml | 9 + app/node_modules/getpass/LICENSE | 18 + app/node_modules/getpass/README.md | 32 + app/node_modules/getpass/lib/index.js | 123 + app/node_modules/getpass/package.json | 54 + app/node_modules/glob/LICENSE | 15 + app/node_modules/glob/README.md | 368 + app/node_modules/glob/changelog.md | 67 + app/node_modules/glob/common.js | 240 + app/node_modules/glob/glob.js | 790 ++ app/node_modules/glob/package.json | 80 + app/node_modules/glob/sync.js | 486 + app/node_modules/graceful-fs/LICENSE | 15 + app/node_modules/graceful-fs/README.md | 133 + app/node_modules/graceful-fs/fs.js | 21 + app/node_modules/graceful-fs/graceful-fs.js | 262 + .../graceful-fs/legacy-streams.js | 118 + app/node_modules/graceful-fs/package.json | 94 + app/node_modules/graceful-fs/polyfills.js | 330 + app/node_modules/har-schema/LICENSE | 13 + app/node_modules/har-schema/README.md | 49 + .../har-schema/lib/afterRequest.json | 30 + .../har-schema/lib/beforeRequest.json | 30 + app/node_modules/har-schema/lib/browser.json | 20 + app/node_modules/har-schema/lib/cache.json | 21 + app/node_modules/har-schema/lib/content.json | 29 + app/node_modules/har-schema/lib/cookie.json | 36 + app/node_modules/har-schema/lib/creator.json | 20 + app/node_modules/har-schema/lib/entry.json | 53 + app/node_modules/har-schema/lib/har.json | 13 + app/node_modules/har-schema/lib/header.json | 20 + app/node_modules/har-schema/lib/index.js | 22 + app/node_modules/har-schema/lib/log.json | 36 + app/node_modules/har-schema/lib/page.json | 32 + .../har-schema/lib/pageTimings.json | 18 + app/node_modules/har-schema/lib/postData.json | 43 + app/node_modules/har-schema/lib/query.json | 20 + app/node_modules/har-schema/lib/request.json | 57 + app/node_modules/har-schema/lib/response.json | 54 + app/node_modules/har-schema/lib/timings.json | 42 + app/node_modules/har-schema/package.json | 90 + app/node_modules/har-validator/LICENSE | 13 + app/node_modules/har-validator/README.md | 54 + app/node_modules/har-validator/lib/async.js | 98 + app/node_modules/har-validator/lib/error.js | 17 + app/node_modules/har-validator/lib/promise.js | 95 + app/node_modules/har-validator/package.json | 79 + app/node_modules/hawk/.npmignore | 5 + app/node_modules/hawk/LICENSE | 28 + app/node_modules/hawk/README.md | 637 ++ app/node_modules/hawk/client.js | 3 + app/node_modules/hawk/lib/browser.js | 653 ++ app/node_modules/hawk/lib/client.js | 394 + app/node_modules/hawk/lib/crypto.js | 128 + app/node_modules/hawk/lib/index.js | 17 + app/node_modules/hawk/lib/server.js | 550 + app/node_modules/hawk/lib/utils.js | 186 + app/node_modules/hawk/package.json | 82 + app/node_modules/hoek/.npmignore | 3 + app/node_modules/hoek/LICENSE | 32 + app/node_modules/hoek/README.md | 30 + app/node_modules/hoek/lib/escape.js | 168 + app/node_modules/hoek/lib/index.js | 978 ++ app/node_modules/hoek/package.json | 62 + app/node_modules/home-path/.travis.yml | 12 + app/node_modules/home-path/LICENSE | 21 + app/node_modules/home-path/README.hbs | 11 + app/node_modules/home-path/README.md | 43 + app/node_modules/home-path/index.js | 42 + app/node_modules/home-path/package.json | 61 + app/node_modules/home-path/test.js | 7 + app/node_modules/hosted-git-info/CHANGELOG.md | 17 + app/node_modules/hosted-git-info/LICENSE | 13 + app/node_modules/hosted-git-info/README.md | 133 + .../hosted-git-info/git-host-info.js | 78 + app/node_modules/hosted-git-info/git-host.js | 129 + app/node_modules/hosted-git-info/index.js | 121 + app/node_modules/hosted-git-info/package.json | 75 + .../http-signature/.dir-locals.el | 6 + app/node_modules/http-signature/.npmignore | 7 + app/node_modules/http-signature/CHANGES.md | 46 + app/node_modules/http-signature/LICENSE | 18 + app/node_modules/http-signature/README.md | 79 + .../http-signature/http_signing.md | 363 + app/node_modules/http-signature/lib/index.js | 29 + app/node_modules/http-signature/lib/parser.js | 315 + app/node_modules/http-signature/lib/signer.js | 401 + app/node_modules/http-signature/lib/utils.js | 112 + app/node_modules/http-signature/lib/verify.js | 88 + app/node_modules/http-signature/package.json | 81 + app/node_modules/indent-string/index.js | 20 + app/node_modules/indent-string/license | 21 + app/node_modules/indent-string/package.json | 72 + app/node_modules/indent-string/readme.md | 58 + app/node_modules/inflight/LICENSE | 15 + app/node_modules/inflight/README.md | 37 + app/node_modules/inflight/inflight.js | 54 + app/node_modules/inflight/package.json | 63 + app/node_modules/inherits/LICENSE | 16 + app/node_modules/inherits/README.md | 42 + app/node_modules/inherits/inherits.js | 7 + app/node_modules/inherits/inherits_browser.js | 23 + app/node_modules/inherits/package.json | 69 + app/node_modules/ini/LICENSE | 15 + app/node_modules/ini/README.md | 102 + app/node_modules/ini/ini.js | 194 + app/node_modules/ini/package.json | 67 + app/node_modules/is-arrayish/.editorconfig | 18 + app/node_modules/is-arrayish/.istanbul.yml | 4 + app/node_modules/is-arrayish/.npmignore | 5 + app/node_modules/is-arrayish/.travis.yml | 17 + app/node_modules/is-arrayish/LICENSE | 21 + app/node_modules/is-arrayish/README.md | 16 + app/node_modules/is-arrayish/index.js | 10 + app/node_modules/is-arrayish/package.json | 70 + app/node_modules/is-builtin-module/index.js | 10 + app/node_modules/is-builtin-module/license | 21 + .../is-builtin-module/package.json | 79 + app/node_modules/is-builtin-module/readme.md | 33 + app/node_modules/is-finite/index.js | 6 + app/node_modules/is-finite/license | 21 + app/node_modules/is-finite/package.json | 72 + app/node_modules/is-finite/readme.md | 28 + .../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 + app/node_modules/is-promise/.npmignore | 10 +- app/node_modules/is-promise/index.js | 8 +- app/node_modules/is-promise/package.json | 24 +- app/node_modules/is-promise/readme.md | 58 +- app/node_modules/is-typedarray/LICENSE.md | 18 + app/node_modules/is-typedarray/README.md | 16 + app/node_modules/is-typedarray/index.js | 41 + app/node_modules/is-typedarray/package.json | 63 + app/node_modules/is-typedarray/test.js | 34 + app/node_modules/is-utf8/LICENSE | 9 + app/node_modules/is-utf8/README.md | 16 + app/node_modules/is-utf8/is-utf8.js | 76 + app/node_modules/is-utf8/package.json | 57 + app/node_modules/isarray/README.md | 54 + app/node_modules/isarray/build/build.js | 209 + app/node_modules/isarray/component.json | 19 + app/node_modules/isarray/index.js | 3 + app/node_modules/isarray/package.json | 61 + app/node_modules/isbinaryfile/package.json | 24 +- app/node_modules/isstream/.jshintrc | 59 + app/node_modules/isstream/.npmignore | 1 + app/node_modules/isstream/.travis.yml | 12 + app/node_modules/isstream/LICENSE.md | 11 + app/node_modules/isstream/README.md | 66 + app/node_modules/isstream/isstream.js | 27 + app/node_modules/isstream/package.json | 65 + app/node_modules/isstream/test.js | 168 + app/node_modules/jquery/AUTHORS.txt | 313 + app/node_modules/jquery/LICENSE.txt | 36 + app/node_modules/jquery/README.md | 67 + app/node_modules/jquery/bower.json | 14 + .../jquery/external/sizzle/LICENSE.txt | 36 + app/node_modules/jquery/package.json | 136 + app/node_modules/jquery/src/.eslintrc.json | 5 + app/node_modules/jquery/src/ajax.js | 856 ++ app/node_modules/jquery/src/ajax/jsonp.js | 103 + app/node_modules/jquery/src/ajax/load.js | 77 + app/node_modules/jquery/src/ajax/parseXML.js | 30 + app/node_modules/jquery/src/ajax/script.js | 77 + .../jquery/src/ajax/var/location.js | 5 + app/node_modules/jquery/src/ajax/var/nonce.js | 5 + .../jquery/src/ajax/var/rquery.js | 5 + app/node_modules/jquery/src/ajax/xhr.js | 170 + app/node_modules/jquery/src/attributes.js | 13 + .../jquery/src/attributes/attr.js | 141 + .../jquery/src/attributes/classes.js | 186 + .../jquery/src/attributes/prop.js | 143 + .../jquery/src/attributes/support.js | 33 + app/node_modules/jquery/src/attributes/val.js | 191 + app/node_modules/jquery/src/callbacks.js | 236 + app/node_modules/jquery/src/core.js | 399 + app/node_modules/jquery/src/core/DOMEval.js | 30 + app/node_modules/jquery/src/core/access.js | 72 + app/node_modules/jquery/src/core/camelCase.js | 23 + app/node_modules/jquery/src/core/init.js | 129 + app/node_modules/jquery/src/core/nodeName.js | 13 + app/node_modules/jquery/src/core/parseHTML.js | 65 + .../jquery/src/core/ready-no-deferred.js | 97 + app/node_modules/jquery/src/core/ready.js | 86 + .../jquery/src/core/readyException.js | 13 + .../jquery/src/core/stripAndCollapse.js | 14 + app/node_modules/jquery/src/core/support.js | 20 + app/node_modules/jquery/src/core/toType.js | 20 + .../jquery/src/core/var/rsingleTag.js | 6 + app/node_modules/jquery/src/css.js | 481 + .../jquery/src/css/addGetHookIf.js | 26 + app/node_modules/jquery/src/css/adjustCSS.js | 73 + app/node_modules/jquery/src/css/curCSS.js | 65 + .../jquery/src/css/hiddenVisibleSelectors.js | 15 + app/node_modules/jquery/src/css/showHide.js | 105 + app/node_modules/jquery/src/css/support.js | 102 + .../jquery/src/css/var/cssExpand.js | 5 + .../jquery/src/css/var/getStyles.js | 17 + .../jquery/src/css/var/isHiddenWithinTree.js | 34 + .../jquery/src/css/var/rboxStyle.js | 7 + .../jquery/src/css/var/rnumnonpx.js | 7 + app/node_modules/jquery/src/css/var/swap.js | 26 + app/node_modules/jquery/src/data.js | 180 + app/node_modules/jquery/src/data/Data.js | 162 + .../jquery/src/data/var/acceptData.js | 19 + .../jquery/src/data/var/dataPriv.js | 7 + .../jquery/src/data/var/dataUser.js | 7 + app/node_modules/jquery/src/deferred.js | 399 + .../jquery/src/deferred/exceptionHook.js | 21 + app/node_modules/jquery/src/deprecated.js | 98 + app/node_modules/jquery/src/dimensions.js | 57 + app/node_modules/jquery/src/effects.js | 702 ++ app/node_modules/jquery/src/effects/Tween.js | 123 + .../jquery/src/effects/animatedSelector.js | 15 + app/node_modules/jquery/src/event.js | 748 ++ app/node_modules/jquery/src/event/ajax.js | 22 + app/node_modules/jquery/src/event/alias.js | 29 + app/node_modules/jquery/src/event/focusin.js | 55 + app/node_modules/jquery/src/event/support.js | 11 + app/node_modules/jquery/src/event/trigger.js | 199 + app/node_modules/jquery/src/exports/amd.js | 26 + app/node_modules/jquery/src/exports/global.js | 34 + app/node_modules/jquery/src/jquery.js | 40 + app/node_modules/jquery/src/manipulation.js | 486 + .../jquery/src/manipulation/_evalUrl.js | 23 + .../jquery/src/manipulation/buildFragment.js | 105 + .../jquery/src/manipulation/getAll.js | 32 + .../jquery/src/manipulation/setGlobalEval.js | 22 + .../jquery/src/manipulation/support.js | 35 + .../src/manipulation/var/rcheckableType.js | 5 + .../src/manipulation/var/rscriptType.js | 5 + .../jquery/src/manipulation/var/rtagName.js | 5 + .../jquery/src/manipulation/wrapMap.js | 29 + app/node_modules/jquery/src/offset.js | 233 + app/node_modules/jquery/src/queue.js | 145 + app/node_modules/jquery/src/queue/delay.js | 24 + .../jquery/src/selector-native.js | 237 + .../jquery/src/selector-sizzle.js | 19 + app/node_modules/jquery/src/selector.js | 3 + app/node_modules/jquery/src/serialize.js | 132 + app/node_modules/jquery/src/traversing.js | 191 + .../jquery/src/traversing/findFilter.js | 97 + .../jquery/src/traversing/var/dir.js | 22 + .../src/traversing/var/rneedsContext.js | 8 + .../jquery/src/traversing/var/siblings.js | 17 + .../jquery/src/var/ObjectFunctionString.js | 7 + app/node_modules/jquery/src/var/arr.js | 5 + app/node_modules/jquery/src/var/class2type.js | 6 + app/node_modules/jquery/src/var/concat.js | 7 + app/node_modules/jquery/src/var/document.js | 5 + .../jquery/src/var/documentElement.js | 7 + app/node_modules/jquery/src/var/fnToString.js | 7 + app/node_modules/jquery/src/var/getProto.js | 5 + app/node_modules/jquery/src/var/hasOwn.js | 7 + app/node_modules/jquery/src/var/indexOf.js | 7 + app/node_modules/jquery/src/var/isFunction.js | 13 + app/node_modules/jquery/src/var/isWindow.js | 8 + app/node_modules/jquery/src/var/pnum.js | 5 + app/node_modules/jquery/src/var/push.js | 7 + app/node_modules/jquery/src/var/rcssNum.js | 9 + .../jquery/src/var/rnothtmlwhite.js | 8 + app/node_modules/jquery/src/var/slice.js | 7 + app/node_modules/jquery/src/var/support.js | 6 + app/node_modules/jquery/src/var/toString.js | 7 + app/node_modules/jquery/src/wrap.js | 78 + app/node_modules/jsbn/.npmignore | 2 + app/node_modules/jsbn/LICENSE | 40 + app/node_modules/jsbn/README.md | 175 + app/node_modules/jsbn/example.html | 12 + app/node_modules/jsbn/example.js | 3 + app/node_modules/jsbn/index.js | 1357 +++ app/node_modules/jsbn/package.json | 58 + .../json-schema-traverse/.eslintrc.yml | 27 + .../json-schema-traverse/.npmignore | 60 + .../json-schema-traverse/.travis.yml | 8 + app/node_modules/json-schema-traverse/LICENSE | 21 + .../json-schema-traverse/README.md | 69 + .../json-schema-traverse/index.js | 81 + .../json-schema-traverse/package.json | 74 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 102 + app/node_modules/json-schema/README.md | 5 + .../json-schema/draft-00/hyper-schema | 68 + .../json-schema/draft-00/json-ref | 26 + app/node_modules/json-schema/draft-00/links | 33 + app/node_modules/json-schema/draft-00/schema | 155 + .../json-schema/draft-01/hyper-schema | 68 + .../json-schema/draft-01/json-ref | 26 + app/node_modules/json-schema/draft-01/links | 33 + app/node_modules/json-schema/draft-01/schema | 155 + .../json-schema/draft-02/hyper-schema | 68 + .../json-schema/draft-02/json-ref | 26 + app/node_modules/json-schema/draft-02/links | 35 + app/node_modules/json-schema/draft-02/schema | 166 + .../json-schema/draft-03/examples/address | 20 + .../json-schema/draft-03/examples/calendar | 53 + .../json-schema/draft-03/examples/card | 105 + .../json-schema/draft-03/examples/geo | 8 + .../json-schema/draft-03/examples/interfaces | 23 + .../json-schema/draft-03/hyper-schema | 60 + .../json-schema/draft-03/json-ref | 26 + app/node_modules/json-schema/draft-03/links | 35 + app/node_modules/json-schema/draft-03/schema | 174 + .../json-schema/draft-04/hyper-schema | 60 + app/node_modules/json-schema/draft-04/links | 41 + app/node_modules/json-schema/draft-04/schema | 189 + .../json-schema/draft-zyp-json-schema-03.xml | 1120 +++ .../json-schema/draft-zyp-json-schema-04.xml | 1072 ++ app/node_modules/json-schema/lib/links.js | 66 + app/node_modules/json-schema/lib/validate.js | 273 + app/node_modules/json-schema/package.json | 75 + app/node_modules/json-schema/test/tests.js | 95 + .../json-stringify-safe/.npmignore | 1 + .../json-stringify-safe/CHANGELOG.md | 14 + app/node_modules/json-stringify-safe/LICENSE | 15 + app/node_modules/json-stringify-safe/Makefile | 35 + .../json-stringify-safe/README.md | 52 + .../json-stringify-safe/package.json | 70 + .../json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + app/node_modules/jsonfile/.npmignore | 2 + app/node_modules/jsonfile/CHANGELOG.md | 126 + app/node_modules/jsonfile/LICENSE | 15 + app/node_modules/jsonfile/README.md | 162 + app/node_modules/jsonfile/appveyor.yml | 28 + app/node_modules/jsonfile/index.js | 133 + app/node_modules/jsonfile/package.json | 75 + app/node_modules/jsprim/CHANGES.md | 49 + app/node_modules/jsprim/CONTRIBUTING.md | 19 + app/node_modules/jsprim/LICENSE | 19 + app/node_modules/jsprim/README.md | 287 + app/node_modules/jsprim/lib/jsprim.js | 735 ++ app/node_modules/jsprim/package.json | 53 + .../README.md | 67 + .../example.js | 6 + .../index.js | 264 + .../license | 21 + .../package.json | 62 + .../keyboardevents-areequal/README.md | 42 + .../keyboardevents-areequal/example.js | 4 + .../keyboardevents-areequal/index.js | 39 + .../keyboardevents-areequal/license | 21 + .../keyboardevents-areequal/package.json | 62 + app/node_modules/klaw/.npmignore | 3 + app/node_modules/klaw/CHANGELOG.md | 42 + app/node_modules/klaw/LICENSE | 15 + app/node_modules/klaw/README.md | 270 + app/node_modules/klaw/package.json | 75 + app/node_modules/klaw/src/assign.js | 16 + app/node_modules/klaw/src/index.js | 57 + app/node_modules/load-json-file/index.js | 21 + app/node_modules/load-json-file/license | 21 + app/node_modules/load-json-file/package.json | 82 + app/node_modules/load-json-file/readme.md | 45 + .../node_modules/path-exists/package.json | 24 +- app/node_modules/locate-path/package.json | 24 +- app/node_modules/lodash.get/package.json | 24 +- app/node_modules/loud-rejection/api.js | 11 + app/node_modules/loud-rejection/index.js | 36 + app/node_modules/loud-rejection/license | 21 + app/node_modules/loud-rejection/package.json | 95 + app/node_modules/loud-rejection/readme.md | 68 + app/node_modules/loud-rejection/register.js | 2 + app/node_modules/map-obj/index.js | 13 + app/node_modules/map-obj/license | 21 + app/node_modules/map-obj/package.json | 73 + app/node_modules/map-obj/readme.md | 29 + app/node_modules/meow/index.js | 82 + app/node_modules/meow/license | 21 + app/node_modules/meow/package.json | 94 + app/node_modules/meow/readme.md | 159 + app/node_modules/mime-db/HISTORY.md | 368 + app/node_modules/mime-db/LICENSE | 22 + app/node_modules/mime-db/README.md | 94 + app/node_modules/mime-db/db.json | 7088 +++++++++++++ app/node_modules/mime-db/index.js | 11 + app/node_modules/mime-db/package.json | 104 + app/node_modules/mime-types/HISTORY.md | 260 + app/node_modules/mime-types/LICENSE | 23 + app/node_modules/mime-types/README.md | 108 + app/node_modules/mime-types/index.js | 188 + app/node_modules/mime-types/package.json | 91 + app/node_modules/minimatch/LICENSE | 15 + app/node_modules/minimatch/README.md | 209 + app/node_modules/minimatch/minimatch.js | 923 ++ app/node_modules/minimatch/package.json | 69 + app/node_modules/minimist/.travis.yml | 8 + app/node_modules/minimist/LICENSE | 18 + app/node_modules/minimist/example/parse.js | 2 + app/node_modules/minimist/index.js | 236 + app/node_modules/minimist/package.json | 82 + app/node_modules/minimist/readme.markdown | 91 + app/node_modules/minimist/test/all_bool.js | 32 + app/node_modules/minimist/test/bool.js | 166 + app/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + app/node_modules/minimist/test/dotted.js | 22 + app/node_modules/minimist/test/kv_short.js | 16 + app/node_modules/minimist/test/long.js | 31 + app/node_modules/minimist/test/num.js | 36 + app/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + app/node_modules/minimist/test/short.js | 67 + app/node_modules/minimist/test/stop_early.js | 15 + app/node_modules/minimist/test/unknown.js | 102 + app/node_modules/minimist/test/whitespace.js | 8 + app/node_modules/mkdirp/.npmignore | 2 + app/node_modules/mkdirp/.travis.yml | 5 + app/node_modules/mkdirp/LICENSE | 21 + app/node_modules/mkdirp/bin/cmd.js | 33 + app/node_modules/mkdirp/bin/usage.txt | 12 + app/node_modules/mkdirp/examples/pow.js | 6 + app/node_modules/mkdirp/index.js | 97 + .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 + .../mkdirp/node_modules/minimist/package.json | 75 + .../node_modules/minimist/readme.markdown | 73 + .../mkdirp/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + app/node_modules/mkdirp/package.json | 67 + app/node_modules/mkdirp/readme.markdown | 100 + app/node_modules/mkdirp/test/chmod.js | 38 + app/node_modules/mkdirp/test/clobber.js | 37 + app/node_modules/mkdirp/test/mkdirp.js | 26 + app/node_modules/mkdirp/test/opts_fs.js | 27 + app/node_modules/mkdirp/test/opts_fs_sync.js | 25 + app/node_modules/mkdirp/test/perm.js | 30 + app/node_modules/mkdirp/test/perm_sync.js | 34 + app/node_modules/mkdirp/test/race.js | 40 + app/node_modules/mkdirp/test/rel.js | 30 + app/node_modules/mkdirp/test/return.js | 25 + app/node_modules/mkdirp/test/return_sync.js | 24 + app/node_modules/mkdirp/test/root.js | 18 + app/node_modules/mkdirp/test/sync.js | 30 + app/node_modules/mkdirp/test/umask.js | 26 + app/node_modules/mkdirp/test/umask_sync.js | 30 + app/node_modules/mkpath/package.json | 24 +- .../node_modules/fs-extra/package.json | 14 +- app/node_modules/mksnapshot/package.json | 24 +- app/node_modules/ms/index.js | 152 + app/node_modules/ms/license.md | 21 + app/node_modules/ms/package.json | 77 + app/node_modules/ms/readme.md | 51 + app/node_modules/nodeify/package.json | 24 +- app/node_modules/nopt/bin/nopt.js | 0 app/node_modules/nopt/examples/my-program.js | 0 app/node_modules/nopt/package.json | 24 +- .../normalize-package-data/AUTHORS | 4 + .../normalize-package-data/LICENSE | 30 + .../normalize-package-data/README.md | 106 + .../lib/extract_description.js | 14 + .../normalize-package-data/lib/fixer.js | 417 + .../lib/make_warning.js | 23 + .../normalize-package-data/lib/normalize.js | 39 + .../normalize-package-data/lib/safe_format.js | 9 + .../normalize-package-data/lib/typos.json | 25 + .../lib/warning_messages.json | 30 + .../normalize-package-data/package.json | 83 + app/node_modules/nugget/.npmignore | 2 + app/node_modules/nugget/.travis.yml | 3 + app/node_modules/nugget/bin.js | 32 + app/node_modules/nugget/collaborators.md | 9 + app/node_modules/nugget/index.js | 203 + app/node_modules/nugget/multiple.png | Bin 0 -> 29002 bytes app/node_modules/nugget/package.json | 71 + app/node_modules/nugget/readme.md | 58 + app/node_modules/nugget/test/cli.js | 11 + app/node_modules/nugget/test/resume.html | 1 + app/node_modules/nugget/test/resume.js | 41 + app/node_modules/nugget/test/test.js | 38 + app/node_modules/nugget/usage.txt | 8 + app/node_modules/number-is-nan/index.js | 4 + app/node_modules/number-is-nan/license | 21 + app/node_modules/number-is-nan/package.json | 72 + app/node_modules/number-is-nan/readme.md | 28 + app/node_modules/oauth-sign/LICENSE | 55 + app/node_modules/oauth-sign/README.md | 4 + app/node_modules/oauth-sign/index.js | 136 + app/node_modules/oauth-sign/package.json | 60 + app/node_modules/object-assign/index.js | 90 + app/node_modules/object-assign/license | 21 + app/node_modules/object-assign/package.json | 78 + app/node_modules/object-assign/readme.md | 61 + app/node_modules/object-keys/.npmignore | 1 + app/node_modules/object-keys/.travis.yml | 5 + app/node_modules/object-keys/README.md | 39 + app/node_modules/object-keys/foreach.js | 40 + app/node_modules/object-keys/index.js | 2 + app/node_modules/object-keys/isArguments.js | 16 + app/node_modules/object-keys/package.json | 81 + app/node_modules/object-keys/shim.js | 62 + app/node_modules/object-keys/test/foreach.js | 156 + app/node_modules/object-keys/test/index.js | 6 + .../object-keys/test/isArguments.js | 10 + app/node_modules/object-keys/test/shim.js | 134 + app/node_modules/once/LICENSE | 15 + app/node_modules/once/README.md | 79 + app/node_modules/once/once.js | 42 + app/node_modules/once/package.json | 72 + app/node_modules/os-tmpdir/package.json | 24 +- app/node_modules/p-limit/package.json | 24 +- app/node_modules/p-locate/package.json | 24 +- app/node_modules/p-try/package.json | 24 +- app/node_modules/parse-author/package.json | 24 +- app/node_modules/parse-json/index.js | 35 + app/node_modules/parse-json/license | 21 + app/node_modules/parse-json/package.json | 83 + app/node_modules/parse-json/readme.md | 83 + app/node_modules/parse-json/vendor/parse.js | 752 ++ app/node_modules/parse-json/vendor/unicode.js | 71 + app/node_modules/path-exists/index.js | 24 + app/node_modules/path-exists/license | 21 + app/node_modules/path-exists/package.json | 77 + app/node_modules/path-exists/readme.md | 45 + app/node_modules/path-is-absolute/index.js | 20 + app/node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 82 + app/node_modules/path-is-absolute/readme.md | 59 + app/node_modules/path-parse/package.json | 24 +- app/node_modules/path-type/index.js | 29 + app/node_modules/path-type/license | 21 + app/node_modules/path-type/package.json | 88 + app/node_modules/path-type/readme.md | 42 + app/node_modules/pend/LICENSE | 23 + app/node_modules/pend/README.md | 41 + app/node_modules/pend/index.js | 55 + app/node_modules/pend/package.json | 51 + app/node_modules/pend/test.js | 137 + app/node_modules/performance-now/.npmignore | 1 + .../performance-now/.tm_properties | 7 + app/node_modules/performance-now/.travis.yml | 6 + app/node_modules/performance-now/README.md | 30 + .../performance-now/lib/performance-now.js | 36 + .../lib/performance-now.js.map | 10 + app/node_modules/performance-now/license.txt | 7 + app/node_modules/performance-now/package.json | 69 + .../performance-now/src/index.d.ts | 8 + .../src/performance-now.coffee | 17 + .../performance-now/test/mocha.opts | 3 + .../test/performance-now.coffee | 43 + .../performance-now/test/scripts.coffee | 27 + .../test/scripts/delayed-call.coffee | 11 + .../test/scripts/delayed-require.coffee | 12 + .../test/scripts/difference.coffee | 6 + .../test/scripts/initial-value.coffee | 10 + app/node_modules/pify/index.js | 68 + app/node_modules/pify/license | 21 + app/node_modules/pify/package.json | 87 + app/node_modules/pify/readme.md | 119 + app/node_modules/pinkie-promise/index.js | 3 + app/node_modules/pinkie-promise/license | 21 + app/node_modules/pinkie-promise/package.json | 74 + app/node_modules/pinkie-promise/readme.md | 28 + app/node_modules/pinkie/index.js | 292 + app/node_modules/pinkie/license | 21 + app/node_modules/pinkie/package.json | 72 + app/node_modules/pinkie/readme.md | 83 + app/node_modules/plist/dist/plist-parse.js | 1678 ++-- app/node_modules/plist/dist/plist.js | 1678 ++-- app/node_modules/plist/package.json | 24 +- app/node_modules/pnotify/LICENSE | 202 + app/node_modules/pnotify/README.md | 683 ++ app/node_modules/pnotify/lib/es/PNotify.js | 1911 ++++ .../pnotify/lib/es/PNotify.js.map | 1 + .../pnotify/lib/es/PNotifyAnimate.js | 295 + .../pnotify/lib/es/PNotifyAnimate.js.map | 1 + .../pnotify/lib/es/PNotifyButtons.js | 508 + .../pnotify/lib/es/PNotifyButtons.js.map | 1 + .../pnotify/lib/es/PNotifyCallbacks.js | 212 + .../pnotify/lib/es/PNotifyCallbacks.js.map | 1 + .../pnotify/lib/es/PNotifyCompat.js | 225 + .../pnotify/lib/es/PNotifyConfirm.js | 753 ++ .../pnotify/lib/es/PNotifyConfirm.js.map | 1 + .../pnotify/lib/es/PNotifyDesktop.js | 428 + .../pnotify/lib/es/PNotifyDesktop.js.map | 1 + .../pnotify/lib/es/PNotifyHistory.js | 281 + .../pnotify/lib/es/PNotifyHistory.js.map | 1 + .../pnotify/lib/es/PNotifyMobile.js | 418 + .../pnotify/lib/es/PNotifyMobile.js.map | 1 + .../pnotify/lib/es/PNotifyNonBlock.js | 195 + .../pnotify/lib/es/PNotifyNonBlock.js.map | 1 + .../pnotify/lib/es/PNotifyReference.js | 412 + .../pnotify/lib/es/PNotifyReference.js.map | 1 + .../pnotify/lib/es/PNotifyStyleMaterial.js | 199 + .../lib/es/PNotifyStyleMaterial.js.map | 1 + app/node_modules/pnotify/lib/iife/PNotify.js | 1985 ++++ .../pnotify/lib/iife/PNotify.js.map | 1 + .../pnotify/lib/iife/PNotifyAnimate.js | 312 + .../pnotify/lib/iife/PNotifyAnimate.js.map | 1 + .../pnotify/lib/iife/PNotifyButtons.js | 538 + .../pnotify/lib/iife/PNotifyButtons.js.map | 1 + .../pnotify/lib/iife/PNotifyCallbacks.js | 231 + .../pnotify/lib/iife/PNotifyCallbacks.js.map | 1 + .../pnotify/lib/iife/PNotifyCompat.js | 261 + .../pnotify/lib/iife/PNotifyCompat.js.map | 1 + .../pnotify/lib/iife/PNotifyConfirm.js | 750 ++ .../pnotify/lib/iife/PNotifyConfirm.js.map | 1 + .../pnotify/lib/iife/PNotifyDesktop.js | 438 + .../pnotify/lib/iife/PNotifyDesktop.js.map | 1 + .../pnotify/lib/iife/PNotifyHistory.js | 282 + .../pnotify/lib/iife/PNotifyHistory.js.map | 1 + .../pnotify/lib/iife/PNotifyMobile.js | 433 + .../pnotify/lib/iife/PNotifyMobile.js.map | 1 + .../pnotify/lib/iife/PNotifyNonBlock.js | 204 + .../pnotify/lib/iife/PNotifyNonBlock.js.map | 1 + .../pnotify/lib/iife/PNotifyReference.js | 440 + .../pnotify/lib/iife/PNotifyReference.js.map | 1 + .../pnotify/lib/iife/PNotifyStyleMaterial.js | 210 + .../lib/iife/PNotifyStyleMaterial.js.map | 1 + app/node_modules/pnotify/lib/umd/PNotify.js | 1988 ++++ .../pnotify/lib/umd/PNotify.js.map | 1 + .../pnotify/lib/umd/PNotifyAnimate.js | 315 + .../pnotify/lib/umd/PNotifyAnimate.js.map | 1 + .../pnotify/lib/umd/PNotifyButtons.js | 541 + .../pnotify/lib/umd/PNotifyButtons.js.map | 1 + .../pnotify/lib/umd/PNotifyCallbacks.js | 234 + .../pnotify/lib/umd/PNotifyCallbacks.js.map | 1 + .../pnotify/lib/umd/PNotifyCompat.js | 365 + .../pnotify/lib/umd/PNotifyCompat.js.map | 1 + .../pnotify/lib/umd/PNotifyConfirm.js | 753 ++ .../pnotify/lib/umd/PNotifyConfirm.js.map | 1 + .../pnotify/lib/umd/PNotifyDesktop.js | 441 + .../pnotify/lib/umd/PNotifyDesktop.js.map | 1 + .../pnotify/lib/umd/PNotifyHistory.js | 285 + .../pnotify/lib/umd/PNotifyHistory.js.map | 1 + .../pnotify/lib/umd/PNotifyMobile.js | 436 + .../pnotify/lib/umd/PNotifyMobile.js.map | 1 + .../pnotify/lib/umd/PNotifyNonBlock.js | 207 + .../pnotify/lib/umd/PNotifyNonBlock.js.map | 1 + .../pnotify/lib/umd/PNotifyReference.js | 443 + .../pnotify/lib/umd/PNotifyReference.js.map | 1 + .../pnotify/lib/umd/PNotifyStyleMaterial.js | 213 + .../lib/umd/PNotifyStyleMaterial.js.map | 1 + app/node_modules/pnotify/make.js | 264 + app/node_modules/pnotify/package.json | 102 + app/node_modules/pnotify/src/PNotify.html | 1181 +++ .../pnotify/src/PNotifyAnimate.html | 150 + .../pnotify/src/PNotifyBrightTheme.css | 174 + .../pnotify/src/PNotifyButtons.html | 164 + .../pnotify/src/PNotifyCallbacks.html | 68 + app/node_modules/pnotify/src/PNotifyCompat.js | 225 + .../pnotify/src/PNotifyConfirm.html | 214 + .../pnotify/src/PNotifyDesktop.html | 273 + .../pnotify/src/PNotifyHistory.html | 136 + .../pnotify/src/PNotifyMobile.html | 303 + .../pnotify/src/PNotifyNonBlock.html | 50 + .../pnotify/src/PNotifyReference.html | 147 + .../pnotify/src/PNotifyStyleMaterial.html | 258 + app/node_modules/popper.js/README.md | 219 + app/node_modules/popper.js/index.d.ts | 159 + app/node_modules/popper.js/package.json | 88 + app/node_modules/pretty-bytes/cli.js | 32 + app/node_modules/pretty-bytes/license | 21 + app/node_modules/pretty-bytes/package.json | 85 + app/node_modules/pretty-bytes/pretty-bytes.js | 46 + app/node_modules/pretty-bytes/readme.md | 60 + .../process-nextick-args/index.js | 44 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 54 + .../process-nextick-args/readme.md | 18 + app/node_modules/progress-stream/.npmignore | 2 + app/node_modules/progress-stream/LICENSE | 23 + app/node_modules/progress-stream/README.md | 163 + app/node_modules/progress-stream/index.js | 98 + app/node_modules/progress-stream/package.json | 72 + app/node_modules/progress-stream/test/http.js | 30 + .../progress-stream/test/request.js | 20 + app/node_modules/promise/.npmignore | 10 +- app/node_modules/promise/Readme.md | 132 +- app/node_modules/promise/index.js | 194 +- app/node_modules/promise/package.json | 24 +- app/node_modules/punycode/LICENSE-MIT.txt | 20 + app/node_modules/punycode/README.md | 176 + app/node_modules/punycode/package.json | 91 + app/node_modules/punycode/punycode.js | 533 + app/node_modules/q/package.json | 24 +- app/node_modules/qs/.editorconfig | 30 + app/node_modules/qs/.eslintignore | 1 + app/node_modules/qs/.eslintrc | 19 + app/node_modules/qs/CHANGELOG.md | 226 + app/node_modules/qs/LICENSE | 28 + app/node_modules/qs/README.md | 475 + app/node_modules/qs/lib/formats.js | 18 + app/node_modules/qs/lib/index.js | 11 + app/node_modules/qs/lib/parse.js | 174 + app/node_modules/qs/lib/stringify.js | 210 + app/node_modules/qs/lib/utils.js | 213 + app/node_modules/qs/package.json | 84 + app/node_modules/qs/test/.eslintrc | 15 + app/node_modules/qs/test/index.js | 7 + app/node_modules/qs/test/parse.js | 574 ++ app/node_modules/qs/test/stringify.js | 597 ++ app/node_modules/qs/test/utils.js | 34 + app/node_modules/rc/LICENSE.APACHE2 | 15 + app/node_modules/rc/LICENSE.BSD | 26 + app/node_modules/rc/LICENSE.MIT | 24 + app/node_modules/rc/README.md | 227 + app/node_modules/rc/browser.js | 7 + app/node_modules/rc/cli.js | 4 + app/node_modules/rc/index.js | 53 + app/node_modules/rc/lib/utils.js | 104 + app/node_modules/rc/package.json | 69 + app/node_modules/rc/test/ini.js | 16 + app/node_modules/rc/test/nested-env-vars.js | 50 + app/node_modules/rc/test/test.js | 59 + app/node_modules/rcedit/package.json | 24 +- app/node_modules/read-pkg-up/index.js | 31 + app/node_modules/read-pkg-up/license | 21 + app/node_modules/read-pkg-up/package.json | 95 + app/node_modules/read-pkg-up/readme.md | 79 + app/node_modules/read-pkg/index.js | 48 + app/node_modules/read-pkg/license | 21 + app/node_modules/read-pkg/package.json | 78 + app/node_modules/read-pkg/readme.md | 79 + app/node_modules/readable-stream/.npmignore | 5 + app/node_modules/readable-stream/LICENSE | 18 + app/node_modules/readable-stream/README.md | 15 + app/node_modules/readable-stream/duplex.js | 1 + app/node_modules/readable-stream/float.patch | 923 ++ .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 ++ .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + app/node_modules/readable-stream/package.json | 70 + .../readable-stream/passthrough.js | 1 + app/node_modules/readable-stream/readable.js | 10 + app/node_modules/readable-stream/transform.js | 1 + app/node_modules/readable-stream/writable.js | 1 + app/node_modules/redent/index.js | 7 + app/node_modules/redent/license | 21 + app/node_modules/redent/package.json | 79 + app/node_modules/redent/readme.md | 48 + app/node_modules/repeating/index.js | 24 + app/node_modules/repeating/license | 21 + app/node_modules/repeating/package.json | 73 + app/node_modules/repeating/readme.md | 30 + app/node_modules/request/CHANGELOG.md | 706 ++ app/node_modules/request/LICENSE | 55 + app/node_modules/request/README.md | 1097 ++ app/node_modules/request/index.js | 155 + app/node_modules/request/lib/auth.js | 167 + app/node_modules/request/lib/cookies.js | 38 + .../request/lib/getProxyFromURI.js | 79 + app/node_modules/request/lib/har.js | 205 + app/node_modules/request/lib/helpers.js | 66 + app/node_modules/request/lib/multipart.js | 112 + app/node_modules/request/lib/oauth.js | 148 + app/node_modules/request/lib/querystring.js | 50 + app/node_modules/request/lib/redirect.js | 154 + app/node_modules/request/lib/tunnel.js | 175 + app/node_modules/request/package.json | 121 + app/node_modules/request/request.js | 1546 +++ app/node_modules/resolve/package.json | 24 +- app/node_modules/rimraf/LICENSE | 15 + app/node_modules/rimraf/README.md | 101 + app/node_modules/rimraf/bin.js | 50 + app/node_modules/rimraf/package.json | 69 + app/node_modules/rimraf/rimraf.js | 364 + app/node_modules/safe-buffer/LICENSE | 21 + app/node_modules/safe-buffer/README.md | 584 ++ app/node_modules/safe-buffer/index.d.ts | 187 + app/node_modules/safe-buffer/index.js | 62 + app/node_modules/safe-buffer/package.json | 69 + .../sanitize-filename/package.json | 24 +- app/node_modules/semver/LICENSE | 15 + app/node_modules/semver/README.md | 388 + app/node_modules/semver/bin/semver | 143 + app/node_modules/semver/package.json | 61 + app/node_modules/semver/range.bnf | 16 + app/node_modules/semver/semver.js | 1324 +++ app/node_modules/signal-exit/CHANGELOG.md | 27 + app/node_modules/signal-exit/LICENSE.txt | 16 + app/node_modules/signal-exit/README.md | 40 + app/node_modules/signal-exit/index.js | 157 + app/node_modules/signal-exit/package.json | 70 + app/node_modules/signal-exit/signals.js | 53 + app/node_modules/single-line-log/.npmignore | 1 + app/node_modules/single-line-log/LICENSE | 21 + app/node_modules/single-line-log/README.md | 56 + app/node_modules/single-line-log/index.js | 51 + app/node_modules/single-line-log/package.json | 66 + app/node_modules/single-line-log/test.js | 21 + app/node_modules/sntp/.npmignore | 3 + app/node_modules/sntp/LICENSE | 28 + app/node_modules/sntp/README.md | 68 + app/node_modules/sntp/lib/index.js | 412 + app/node_modules/sntp/package.json | 68 + app/node_modules/spdx-correct/LICENSE | 202 + app/node_modules/spdx-correct/README.md | 10 + app/node_modules/spdx-correct/index.js | 326 + app/node_modules/spdx-correct/package.json | 84 + app/node_modules/spdx-exceptions/README.md | 36 + app/node_modules/spdx-exceptions/index.json | 29 + app/node_modules/spdx-exceptions/package.json | 53 + .../spdx-expression-parse/AUTHORS | 4 + .../spdx-expression-parse/LICENSE | 22 + .../spdx-expression-parse/README.md | 91 + .../spdx-expression-parse/index.js | 8 + .../spdx-expression-parse/package.json | 101 + .../spdx-expression-parse/parse.js | 138 + .../spdx-expression-parse/scan.js | 131 + app/node_modules/spdx-license-ids/README.md | 52 + .../spdx-license-ids/deprecated.json | 23 + app/node_modules/spdx-license-ids/index.json | 344 + .../spdx-license-ids/package.json | 82 + app/node_modules/speedometer/LICENSE | 20 + app/node_modules/speedometer/README.md | 38 + app/node_modules/speedometer/index.js | 35 + app/node_modules/speedometer/package.json | 53 + app/node_modules/sshpk/.npmignore | 9 + app/node_modules/sshpk/.travis.yml | 11 + app/node_modules/sshpk/LICENSE | 18 + app/node_modules/sshpk/README.md | 698 ++ app/node_modules/sshpk/bin/sshpk-conv | 202 + app/node_modules/sshpk/bin/sshpk-sign | 191 + app/node_modules/sshpk/bin/sshpk-verify | 166 + app/node_modules/sshpk/lib/algs.js | 166 + app/node_modules/sshpk/lib/certificate.js | 377 + app/node_modules/sshpk/lib/dhe.js | 413 + app/node_modules/sshpk/lib/ed-compat.js | 97 + app/node_modules/sshpk/lib/errors.js | 84 + app/node_modules/sshpk/lib/fingerprint.js | 161 + app/node_modules/sshpk/lib/formats/auto.js | 106 + app/node_modules/sshpk/lib/formats/dnssec.js | 286 + .../sshpk/lib/formats/openssh-cert.js | 322 + app/node_modules/sshpk/lib/formats/pem.js | 191 + app/node_modules/sshpk/lib/formats/pkcs1.js | 376 + app/node_modules/sshpk/lib/formats/pkcs8.js | 616 ++ app/node_modules/sshpk/lib/formats/rfc4253.js | 165 + .../sshpk/lib/formats/ssh-private.js | 261 + app/node_modules/sshpk/lib/formats/ssh.js | 114 + .../sshpk/lib/formats/x509-pem.js | 77 + app/node_modules/sshpk/lib/formats/x509.js | 729 ++ app/node_modules/sshpk/lib/identity.js | 288 + app/node_modules/sshpk/lib/index.js | 39 + app/node_modules/sshpk/lib/key.js | 275 + app/node_modules/sshpk/lib/private-key.js | 252 + app/node_modules/sshpk/lib/signature.js | 313 + app/node_modules/sshpk/lib/ssh-buffer.js | 148 + app/node_modules/sshpk/lib/utils.js | 388 + app/node_modules/sshpk/man/man1/sshpk-conv.1 | 135 + app/node_modules/sshpk/man/man1/sshpk-sign.1 | 81 + .../sshpk/man/man1/sshpk-verify.1 | 68 + app/node_modules/sshpk/package.json | 104 + app/node_modules/string-width/index.js | 37 + app/node_modules/string-width/license | 21 + app/node_modules/string-width/package.json | 92 + app/node_modules/string-width/readme.md | 42 + app/node_modules/string_decoder/.npmignore | 2 + app/node_modules/string_decoder/LICENSE | 20 + app/node_modules/string_decoder/README.md | 7 + app/node_modules/string_decoder/index.js | 221 + app/node_modules/string_decoder/package.json | 57 + app/node_modules/strip-ansi/index.js | 6 + app/node_modules/strip-ansi/license | 21 + app/node_modules/strip-ansi/package.json | 105 + app/node_modules/strip-ansi/readme.md | 33 + app/node_modules/strip-bom/index.js | 17 + app/node_modules/strip-bom/license | 21 + app/node_modules/strip-bom/package.json | 78 + app/node_modules/strip-bom/readme.md | 39 + app/node_modules/strip-indent/cli.js | 49 + app/node_modules/strip-indent/index.js | 16 + app/node_modules/strip-indent/license | 21 + app/node_modules/strip-indent/package.json | 82 + app/node_modules/strip-indent/readme.md | 61 + app/node_modules/strip-json-comments/index.js | 70 + app/node_modules/strip-json-comments/license | 21 + .../strip-json-comments/package.json | 78 + .../strip-json-comments/readme.md | 64 + app/node_modules/sumchecker/LICENSE | 202 + app/node_modules/sumchecker/NEWS.md | 38 + app/node_modules/sumchecker/README.md | 80 + app/node_modules/sumchecker/build.js | 232 + app/node_modules/sumchecker/package.json | 92 + app/node_modules/throttleit/.npmignore | 2 + app/node_modules/throttleit/History.md | 11 + app/node_modules/throttleit/Makefile | 11 + app/node_modules/throttleit/Readme.md | 16 + app/node_modules/throttleit/component.json | 13 + app/node_modules/throttleit/example.js | 14 + app/node_modules/throttleit/index.js | 30 + app/node_modules/throttleit/package.json | 51 + app/node_modules/through2/.jshintrc | 59 + app/node_modules/through2/.npmignore | 1 + app/node_modules/through2/.travis.yml | 12 + app/node_modules/through2/LICENSE | 39 + app/node_modules/through2/README.md | 107 + app/node_modules/through2/package.json | 67 + app/node_modules/through2/test.js | 314 + app/node_modules/through2/through2.js | 42 + app/node_modules/tmp/cleanup.sh | 0 app/node_modules/tmp/package.json | 14 +- app/node_modules/touch/node_modules/.bin/nopt | 16 +- .../touch/node_modules/.bin/nopt.cmd | 7 - .../touch/node_modules/nopt/bin/nopt.js | 0 .../node_modules/nopt/examples/my-program.js | 0 .../touch/node_modules/nopt/package.json | 27 +- app/node_modules/touch/package.json | 14 +- app/node_modules/tough-cookie/LICENSE | 27 + app/node_modules/tough-cookie/README.md | 509 + app/node_modules/tough-cookie/lib/cookie.js | 1426 +++ app/node_modules/tough-cookie/lib/memstore.js | 170 + .../tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 56 + .../tough-cookie/lib/pubsuffix.js | 98 + app/node_modules/tough-cookie/lib/store.js | 71 + app/node_modules/tough-cookie/package.json | 96 + app/node_modules/traverse/examples/json.js | 0 app/node_modules/traverse/examples/leaves.js | 0 .../traverse/examples/negative.js | 0 .../traverse/examples/stringify.js | 0 app/node_modules/traverse/index.js | 0 app/node_modules/traverse/package.json | 27 +- app/node_modules/trim-newlines/index.js | 13 + app/node_modules/trim-newlines/license | 21 + app/node_modules/trim-newlines/package.json | 78 + app/node_modules/trim-newlines/readme.md | 46 + .../truncate-utf8-bytes/package.json | 24 +- app/node_modules/tunnel-agent/LICENSE | 55 + app/node_modules/tunnel-agent/README.md | 4 + app/node_modules/tunnel-agent/index.js | 244 + app/node_modules/tunnel-agent/package.json | 59 + app/node_modules/tweetnacl/.npmignore | 4 + app/node_modules/tweetnacl/AUTHORS.md | 28 + app/node_modules/tweetnacl/CHANGELOG.md | 221 + app/node_modules/tweetnacl/LICENSE | 24 + .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 + app/node_modules/tweetnacl/README.md | 459 + app/node_modules/tweetnacl/nacl-fast.js | 2388 +++++ app/node_modules/tweetnacl/nacl-fast.min.js | 2 + app/node_modules/tweetnacl/nacl.d.ts | 98 + app/node_modules/tweetnacl/nacl.js | 1175 +++ app/node_modules/tweetnacl/nacl.min.js | 1 + app/node_modules/tweetnacl/package.json | 91 + app/node_modules/typedarray/.travis.yml | 4 + app/node_modules/typedarray/LICENSE | 35 + app/node_modules/typedarray/example/tarray.js | 4 + app/node_modules/typedarray/index.js | 630 ++ app/node_modules/typedarray/package.json | 87 + app/node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + app/node_modules/typedarray/test/tarray.js | 10 + app/node_modules/universalify/package.json | 24 +- .../utf8-byte-length/package.json | 24 +- app/node_modules/util-deprecate/History.md | 16 + app/node_modules/util-deprecate/LICENSE | 24 + app/node_modules/util-deprecate/README.md | 53 + app/node_modules/util-deprecate/browser.js | 67 + app/node_modules/util-deprecate/node.js | 6 + app/node_modules/util-deprecate/package.json | 60 + app/node_modules/uuid/.eslintrc.json | 47 + app/node_modules/uuid/AUTHORS | 5 + app/node_modules/uuid/CHANGELOG.md | 57 + app/node_modules/uuid/LICENSE.md | 21 + app/node_modules/uuid/README.md | 293 + app/node_modules/uuid/README_js.md | 280 + app/node_modules/uuid/bin/uuid | 65 + app/node_modules/uuid/index.js | 8 + app/node_modules/uuid/lib/bytesToUuid.js | 23 + app/node_modules/uuid/lib/md5-browser.js | 216 + app/node_modules/uuid/lib/md5.js | 25 + app/node_modules/uuid/lib/rng-browser.js | 32 + app/node_modules/uuid/lib/rng.js | 8 + app/node_modules/uuid/lib/sha1-browser.js | 89 + app/node_modules/uuid/lib/sha1.js | 25 + app/node_modules/uuid/lib/v35.js | 53 + app/node_modules/uuid/package.json | 91 + app/node_modules/uuid/v1.js | 109 + app/node_modules/uuid/v3.js | 4 + app/node_modules/uuid/v4.js | 29 + app/node_modules/uuid/v5.js | 3 + .../validate-npm-package-license/LICENSE | 202 + .../validate-npm-package-license/README.md | 113 + .../validate-npm-package-license/index.js | 84 + .../validate-npm-package-license/package.json | 65 + .../validate-npm-package-license/test.log | 4 + app/node_modules/verror/.npmignore | 9 + app/node_modules/verror/CHANGES.md | 28 + app/node_modules/verror/CONTRIBUTING.md | 19 + app/node_modules/verror/LICENSE | 19 + app/node_modules/verror/README.md | 528 + app/node_modules/verror/lib/verror.js | 451 + app/node_modules/verror/package.json | 55 + app/node_modules/wrappy/LICENSE | 15 + app/node_modules/wrappy/README.md | 36 + app/node_modules/wrappy/package.json | 63 + app/node_modules/wrappy/wrappy.js | 33 + app/node_modules/xmlbuilder/package.json | 14 +- app/node_modules/xmldom/__package__.js | 6 +- app/node_modules/xmldom/dom-parser.js | 502 +- app/node_modules/xmldom/package.json | 24 +- app/node_modules/xmldom/sax.js | 1266 +-- app/node_modules/xtend/.npmignore | 1 + app/node_modules/xtend/LICENCE | 19 + app/node_modules/xtend/Makefile | 4 + app/node_modules/xtend/README.md | 27 + app/node_modules/xtend/has-keys.js | 7 + app/node_modules/xtend/index.js | 25 + app/node_modules/xtend/mutable.js | 25 + app/node_modules/xtend/package.json | 97 + app/node_modules/xtend/test.js | 63 + .../node_modules/camelcase/package.json | 24 +- app/node_modules/yargs-parser/package.json | 24 +- app/node_modules/yauzl/.npmignore | 2 + app/node_modules/yauzl/.travis.yml | 8 + app/node_modules/yauzl/LICENSE | 21 + app/node_modules/yauzl/README.md | 467 + app/node_modules/yauzl/index.js | 626 ++ app/node_modules/yauzl/package.json | 68 + node_modules/.bin/asar | 1 + node_modules/.bin/decompress-zip | 1 + node_modules/.bin/electron-download | 1 + node_modules/.bin/electron-osx-flat | 1 + node_modules/.bin/electron-osx-sign | 1 + node_modules/.bin/electron-packager | 1 + node_modules/.bin/extract-zip | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/nopt | 1 + node_modules/.bin/nugget | 1 + node_modules/.bin/pretty-bytes | 1 + node_modules/.bin/rc | 1 + node_modules/.bin/rimraf | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/sshpk-conv | 1 + node_modules/.bin/sshpk-sign | 1 + node_modules/.bin/sshpk-verify | 1 + node_modules/.bin/strip-indent | 1 + node_modules/.bin/uuid | 1 + node_modules/abbrev/LICENSE | 46 + node_modules/abbrev/README.md | 23 + node_modules/abbrev/abbrev.js | 61 + node_modules/abbrev/package.json | 61 + node_modules/ajv/.tonic_example.js | 20 + node_modules/ajv/LICENSE | 22 + node_modules/ajv/README.md | 1327 +++ node_modules/ajv/lib/$data.js | 49 + node_modules/ajv/lib/ajv.d.ts | 358 + node_modules/ajv/lib/ajv.js | 502 + node_modules/ajv/lib/cache.js | 26 + node_modules/ajv/lib/compile/_rules.js | 31 + node_modules/ajv/lib/compile/async.js | 90 + node_modules/ajv/lib/compile/equal.js | 3 + node_modules/ajv/lib/compile/error_classes.js | 34 + node_modules/ajv/lib/compile/formats.js | 135 + node_modules/ajv/lib/compile/index.js | 380 + node_modules/ajv/lib/compile/resolve.js | 271 + node_modules/ajv/lib/compile/rules.js | 58 + node_modules/ajv/lib/compile/schema_obj.js | 9 + node_modules/ajv/lib/compile/ucs2length.js | 20 + node_modules/ajv/lib/compile/util.js | 267 + node_modules/ajv/lib/dot/_limit.jst | 96 + node_modules/ajv/lib/dot/_limitItems.jst | 10 + node_modules/ajv/lib/dot/_limitLength.jst | 10 + node_modules/ajv/lib/dot/_limitProperties.jst | 10 + node_modules/ajv/lib/dot/allOf.jst | 34 + node_modules/ajv/lib/dot/anyOf.jst | 48 + node_modules/ajv/lib/dot/coerce.def | 61 + node_modules/ajv/lib/dot/const.jst | 11 + node_modules/ajv/lib/dot/contains.jst | 57 + node_modules/ajv/lib/dot/custom.jst | 191 + node_modules/ajv/lib/dot/defaults.def | 32 + node_modules/ajv/lib/dot/definitions.def | 199 + node_modules/ajv/lib/dot/dependencies.jst | 80 + node_modules/ajv/lib/dot/enum.jst | 30 + node_modules/ajv/lib/dot/errors.def | 194 + node_modules/ajv/lib/dot/format.jst | 106 + node_modules/ajv/lib/dot/items.jst | 100 + node_modules/ajv/lib/dot/missing.def | 39 + node_modules/ajv/lib/dot/multipleOf.jst | 20 + node_modules/ajv/lib/dot/not.jst | 43 + node_modules/ajv/lib/dot/oneOf.jst | 44 + node_modules/ajv/lib/dot/pattern.jst | 14 + node_modules/ajv/lib/dot/properties.jst | 327 + node_modules/ajv/lib/dot/propertyNames.jst | 54 + node_modules/ajv/lib/dot/ref.jst | 85 + node_modules/ajv/lib/dot/required.jst | 108 + node_modules/ajv/lib/dot/uniqueItems.jst | 38 + node_modules/ajv/lib/dot/validate.jst | 272 + node_modules/ajv/lib/dotjs/README.md | 3 + node_modules/ajv/lib/dotjs/_limit.js | 149 + node_modules/ajv/lib/dotjs/_limitItems.js | 76 + node_modules/ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + node_modules/ajv/lib/dotjs/allOf.js | 43 + node_modules/ajv/lib/dotjs/anyOf.js | 73 + node_modules/ajv/lib/dotjs/const.js | 55 + node_modules/ajv/lib/dotjs/contains.js | 81 + node_modules/ajv/lib/dotjs/custom.js | 226 + node_modules/ajv/lib/dotjs/dependencies.js | 167 + node_modules/ajv/lib/dotjs/enum.js | 65 + node_modules/ajv/lib/dotjs/format.js | 149 + node_modules/ajv/lib/dotjs/items.js | 140 + node_modules/ajv/lib/dotjs/multipleOf.js | 76 + node_modules/ajv/lib/dotjs/not.js | 83 + node_modules/ajv/lib/dotjs/oneOf.js | 70 + node_modules/ajv/lib/dotjs/pattern.js | 74 + node_modules/ajv/lib/dotjs/properties.js | 468 + node_modules/ajv/lib/dotjs/propertyNames.js | 81 + node_modules/ajv/lib/dotjs/ref.js | 123 + node_modules/ajv/lib/dotjs/required.js | 268 + node_modules/ajv/lib/dotjs/uniqueItems.js | 71 + node_modules/ajv/lib/dotjs/validate.js | 458 + node_modules/ajv/lib/keyword.js | 135 + node_modules/ajv/lib/patternGroups.js | 36 + node_modules/ajv/lib/refs/$data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + node_modules/ajv/lib/refs/json-schema-v5.json | 250 + node_modules/ajv/package.json | 134 + node_modules/ajv/scripts/.eslintrc.yml | 3 + node_modules/ajv/scripts/bundle.js | 61 + node_modules/ajv/scripts/compile-dots.js | 73 + node_modules/ajv/scripts/info | 10 + node_modules/ajv/scripts/prepare-tests | 9 + node_modules/ajv/scripts/travis-gh-pages | 23 + node_modules/ansi-regex/index.js | 4 + node_modules/ansi-regex/license | 21 + node_modules/ansi-regex/package.json | 112 + node_modules/ansi-regex/readme.md | 39 + node_modules/array-find-index/index.js | 25 + node_modules/array-find-index/license | 21 + node_modules/array-find-index/package.json | 71 + node_modules/array-find-index/readme.md | 30 + node_modules/asar/CHANGELOG.md | 65 + node_modules/asar/LICENSE.md | 20 + node_modules/asar/README.md | 193 + node_modules/asar/bin/asar.js | 72 + node_modules/asar/lib/asar.js | 232 + node_modules/asar/lib/crawlfs.js | 21 + node_modules/asar/lib/disk.js | 134 + node_modules/asar/lib/filesystem.js | 151 + node_modules/asar/lib/snapshot.js | 62 + node_modules/asar/package.json | 78 + node_modules/asar/snapcraft.yaml | 18 + node_modules/asn1/.npmignore | 2 + node_modules/asn1/.travis.yml | 4 + node_modules/asn1/LICENSE | 19 + node_modules/asn1/README.md | 50 + node_modules/asn1/lib/ber/errors.js | 13 + node_modules/asn1/lib/ber/index.js | 27 + node_modules/asn1/lib/ber/reader.js | 261 + node_modules/asn1/lib/ber/types.js | 36 + node_modules/asn1/lib/ber/writer.js | 316 + node_modules/asn1/lib/index.js | 20 + node_modules/asn1/package.json | 69 + node_modules/asn1/tst/ber/reader.test.js | 208 + node_modules/asn1/tst/ber/writer.test.js | 370 + node_modules/assert-plus/AUTHORS | 6 + node_modules/assert-plus/CHANGES.md | 14 + node_modules/assert-plus/README.md | 162 + node_modules/assert-plus/assert.js | 211 + node_modules/assert-plus/package.json | 91 + node_modules/asynckit/LICENSE | 21 + node_modules/asynckit/README.md | 233 + node_modules/asynckit/bench.js | 76 + node_modules/asynckit/index.js | 6 + node_modules/asynckit/lib/abort.js | 29 + node_modules/asynckit/lib/async.js | 34 + node_modules/asynckit/lib/defer.js | 26 + node_modules/asynckit/lib/iterate.js | 75 + .../asynckit/lib/readable_asynckit.js | 91 + .../asynckit/lib/readable_parallel.js | 25 + node_modules/asynckit/lib/readable_serial.js | 25 + .../asynckit/lib/readable_serial_ordered.js | 29 + node_modules/asynckit/lib/state.js | 37 + node_modules/asynckit/lib/streamify.js | 141 + node_modules/asynckit/lib/terminator.js | 29 + node_modules/asynckit/package.json | 95 + node_modules/asynckit/parallel.js | 43 + node_modules/asynckit/serial.js | 17 + node_modules/asynckit/serialOrdered.js | 75 + node_modules/asynckit/stream.js | 21 + node_modules/author-regex/LICENSE | 22 + node_modules/author-regex/README.md | 69 + node_modules/author-regex/index.js | 13 + node_modules/author-regex/package.json | 92 + node_modules/aws-sign2/LICENSE | 55 + node_modules/aws-sign2/README.md | 4 + node_modules/aws-sign2/index.js | 212 + node_modules/aws-sign2/package.json | 54 + node_modules/aws4/.travis.yml | 5 + node_modules/aws4/LICENSE | 19 + node_modules/aws4/README.md | 523 + node_modules/aws4/aws4.js | 332 + node_modules/aws4/lru.js | 96 + node_modules/aws4/package.json | 108 + node_modules/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/base64-js/LICENSE | 21 + node_modules/base64-js/README.md | 32 + node_modules/base64-js/base64js.min.js | 1 + node_modules/base64-js/index.js | 114 + node_modules/base64-js/package.json | 69 + node_modules/base64-js/test/big-data.js | 24 + node_modules/base64-js/test/convert.js | 48 + node_modules/base64-js/test/url-safe.js | 18 + node_modules/bcrypt-pbkdf/README.md | 39 + node_modules/bcrypt-pbkdf/index.js | 556 + node_modules/bcrypt-pbkdf/package.json | 41 + node_modules/binary/.npmignore | 1 + node_modules/binary/.travis.yml | 4 + node_modules/binary/README.markdown | 177 + node_modules/binary/example/buf.js | 11 + node_modules/binary/example/parse.js | 10 + node_modules/binary/example/stream.js | 12 + node_modules/binary/index.js | 397 + node_modules/binary/lib/vars.js | 28 + node_modules/binary/package.json | 71 + node_modules/binary/perf/loop.js | 92 + node_modules/binary/perf/small.js | 80 + node_modules/binary/test/bu.js | 46 + node_modules/binary/test/deferred.js | 20 + node_modules/binary/test/dots.js | 23 + node_modules/binary/test/eof.js | 41 + node_modules/binary/test/flush.js | 17 + node_modules/binary/test/from_buffer.js | 14 + node_modules/binary/test/get_buffer.js | 28 + node_modules/binary/test/immediate.js | 18 + node_modules/binary/test/interval.js | 38 + node_modules/binary/test/into_buffer.js | 35 + node_modules/binary/test/into_stream.js | 43 + node_modules/binary/test/loop.js | 44 + node_modules/binary/test/loop_scan.js | 54 + node_modules/binary/test/lu.js | 46 + node_modules/binary/test/negbs.js | 29 + node_modules/binary/test/negls.js | 29 + node_modules/binary/test/nested.js | 35 + node_modules/binary/test/not_enough_buf.js | 17 + node_modules/binary/test/not_enough_parse.js | 19 + node_modules/binary/test/parse.js | 54 + node_modules/binary/test/peek.js | 40 + node_modules/binary/test/pipe.js | 49 + node_modules/binary/test/posbs.js | 29 + node_modules/binary/test/posls.js | 29 + node_modules/binary/test/scan.js | 33 + node_modules/binary/test/scan_buf.js | 18 + node_modules/binary/test/scan_buf_null.js | 16 + node_modules/binary/test/skip.js | 58 + node_modules/binary/test/split.js | 34 + node_modules/bluebird/LICENSE | 21 + node_modules/bluebird/README.md | 52 + node_modules/bluebird/changelog.md | 1 + .../bluebird/js/browser/bluebird.core.js | 3781 +++++++ .../bluebird/js/browser/bluebird.core.min.js | 31 + node_modules/bluebird/js/browser/bluebird.js | 5623 +++++++++++ .../bluebird/js/browser/bluebird.min.js | 31 + node_modules/bluebird/js/release/any.js | 21 + node_modules/bluebird/js/release/assert.js | 55 + node_modules/bluebird/js/release/async.js | 161 + node_modules/bluebird/js/release/bind.js | 67 + node_modules/bluebird/js/release/bluebird.js | 11 + node_modules/bluebird/js/release/call_get.js | 123 + node_modules/bluebird/js/release/cancel.js | 129 + .../bluebird/js/release/catch_filter.js | 42 + node_modules/bluebird/js/release/context.js | 69 + .../bluebird/js/release/debuggability.js | 919 ++ .../bluebird/js/release/direct_resolve.js | 46 + node_modules/bluebird/js/release/each.js | 30 + node_modules/bluebird/js/release/errors.js | 116 + node_modules/bluebird/js/release/es5.js | 80 + node_modules/bluebird/js/release/filter.js | 12 + node_modules/bluebird/js/release/finally.js | 146 + .../bluebird/js/release/generators.js | 223 + node_modules/bluebird/js/release/join.js | 168 + node_modules/bluebird/js/release/map.js | 168 + node_modules/bluebird/js/release/method.js | 55 + node_modules/bluebird/js/release/nodeback.js | 51 + node_modules/bluebird/js/release/nodeify.js | 58 + node_modules/bluebird/js/release/promise.js | 775 ++ .../bluebird/js/release/promise_array.js | 185 + node_modules/bluebird/js/release/promisify.js | 314 + node_modules/bluebird/js/release/props.js | 118 + node_modules/bluebird/js/release/queue.js | 73 + node_modules/bluebird/js/release/race.js | 49 + node_modules/bluebird/js/release/reduce.js | 172 + node_modules/bluebird/js/release/schedule.js | 61 + node_modules/bluebird/js/release/settle.js | 43 + node_modules/bluebird/js/release/some.js | 148 + .../js/release/synchronous_inspection.js | 103 + node_modules/bluebird/js/release/thenables.js | 86 + node_modules/bluebird/js/release/timers.js | 93 + node_modules/bluebird/js/release/using.js | 226 + node_modules/bluebird/js/release/util.js | 380 + node_modules/bluebird/package.json | 106 + node_modules/boom/LICENSE | 29 + node_modules/boom/README.md | 760 ++ node_modules/boom/lib/index.js | 433 + node_modules/boom/package.json | 65 + 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/buffers/README.markdown | 122 + node_modules/buffers/examples/slice.js | 9 + node_modules/buffers/examples/splice.js | 17 + node_modules/buffers/index.js | 269 + node_modules/buffers/package.json | 54 + node_modules/buffers/test/buffers.js | 209 + .../builtin-modules/builtin-modules.json | 35 + node_modules/builtin-modules/index.js | 10 + node_modules/builtin-modules/license | 21 + node_modules/builtin-modules/package.json | 76 + node_modules/builtin-modules/readme.md | 41 + node_modules/builtin-modules/static.js | 2 + node_modules/camelcase-keys/index.js | 12 + node_modules/camelcase-keys/license | 21 + node_modules/camelcase-keys/package.json | 88 + node_modules/camelcase-keys/readme.md | 54 + node_modules/camelcase/index.js | 56 + node_modules/camelcase/license | 21 + node_modules/camelcase/package.json | 75 + node_modules/camelcase/readme.md | 57 + node_modules/caseless/LICENSE | 28 + node_modules/caseless/README.md | 45 + node_modules/caseless/index.js | 67 + node_modules/caseless/package.json | 60 + node_modules/caseless/test.js | 67 + node_modules/chainsaw/.npmignore | 1 + node_modules/chainsaw/README.markdown | 157 + node_modules/chainsaw/examples/add_do.js | 25 + node_modules/chainsaw/examples/prompt.js | 67 + node_modules/chainsaw/index.js | 145 + node_modules/chainsaw/package.json | 62 + node_modules/chainsaw/test/chainsaw.js | 418 + node_modules/chromium-pickle-js/README.md | 132 + .../chromium-pickle-js/lib/exports.js | 11 + node_modules/chromium-pickle-js/lib/pickle.js | 222 + node_modules/chromium-pickle-js/package.json | 51 + node_modules/co/History.md | 172 + node_modules/co/LICENSE | 22 + node_modules/co/Readme.md | 212 + node_modules/co/index.js | 237 + node_modules/co/package.json | 70 + 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/combined-stream/License | 19 + node_modules/combined-stream/Readme.md | 138 + .../combined-stream/lib/combined_stream.js | 189 + node_modules/combined-stream/lib/defer.js | 26 + node_modules/combined-stream/package.json | 62 + node_modules/commander/CHANGELOG.md | 356 + node_modules/commander/LICENSE | 22 + node_modules/commander/Readme.md | 408 + node_modules/commander/index.js | 1231 +++ node_modules/commander/package.json | 73 + node_modules/commander/typings/index.d.ts | 309 + node_modules/compare-version/README.md | 31 + node_modules/compare-version/index.js | 33 + node_modules/compare-version/package.json | 68 + node_modules/concat-map/.travis.yml | 4 + node_modules/concat-map/LICENSE | 18 + node_modules/concat-map/README.markdown | 62 + node_modules/concat-map/example/map.js | 6 + node_modules/concat-map/index.js | 13 + node_modules/concat-map/package.json | 92 + node_modules/concat-map/test/map.js | 39 + node_modules/concat-stream/LICENSE | 24 + node_modules/concat-stream/index.js | 143 + .../node_modules/isarray/.npmignore | 1 + .../node_modules/isarray/.travis.yml | 4 + .../node_modules/isarray/Makefile | 6 + .../node_modules/isarray/README.md | 60 + .../node_modules/isarray/component.json | 19 + .../node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 77 + .../node_modules/isarray/test.js | 20 + .../node_modules/readable-stream/.travis.yml | 55 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 58 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 131 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1019 ++ .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 687 ++ .../lib/internal/streams/BufferList.js | 79 + .../lib/internal/streams/destroy.js | 74 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 85 + .../readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + .../node_modules/readable-stream/readable.js | 19 + .../node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + .../node_modules/readable-stream/writable.js | 8 + .../node_modules/string_decoder/.travis.yml | 50 + .../node_modules/string_decoder/LICENSE | 48 + .../node_modules/string_decoder/README.md | 47 + .../string_decoder/lib/string_decoder.js | 296 + .../node_modules/string_decoder/package.json | 63 + node_modules/concat-stream/package.json | 93 + node_modules/concat-stream/readme.md | 102 + node_modules/core-util-is/LICENSE | 19 + node_modules/core-util-is/README.md | 3 + node_modules/core-util-is/float.patch | 604 ++ node_modules/core-util-is/lib/util.js | 107 + node_modules/core-util-is/package.json | 68 + node_modules/core-util-is/test.js | 68 + node_modules/cryptiles/.npmignore | 3 + node_modules/cryptiles/LICENSE | 28 + node_modules/cryptiles/README.md | 19 + node_modules/cryptiles/lib/index.js | 88 + .../cryptiles/node_modules/boom/LICENSE | 29 + .../cryptiles/node_modules/boom/README.md | 784 ++ .../cryptiles/node_modules/boom/lib/index.js | 457 + .../cryptiles/node_modules/boom/package.json | 65 + node_modules/cryptiles/package.json | 65 + node_modules/cuint/.npmignore | 1 + node_modules/cuint/History.md | 74 + node_modules/cuint/README.md | 205 + node_modules/cuint/build.js | 16 + node_modules/cuint/build/uint32.js | 451 + node_modules/cuint/build/uint32.min.js | 1 + node_modules/cuint/build/uint64.js | 648 ++ node_modules/cuint/build/uint64.min.js | 1 + node_modules/cuint/examples/adding.js | 6 + node_modules/cuint/examples/dividing.js | 6 + node_modules/cuint/examples/uint32.html | 19 + node_modules/cuint/index.js | 2 + node_modules/cuint/lib/uint32.js | 451 + node_modules/cuint/lib/uint64.js | 648 ++ node_modules/cuint/package.json | 62 + node_modules/cuint/test/UINT32-test.js | 220 + node_modules/cuint/test/UINT32_add-test.js | 109 + node_modules/cuint/test/UINT32_and-test.js | 64 + node_modules/cuint/test/UINT32_div-test.js | 114 + node_modules/cuint/test/UINT32_equals-test.js | 62 + .../cuint/test/UINT32_greaterThan-test.js | 52 + .../cuint/test/UINT32_lessThan-test.js | 52 + .../cuint/test/UINT32_multiply-test.js | 75 + node_modules/cuint/test/UINT32_negate-test.js | 51 + node_modules/cuint/test/UINT32_not-test.js | 45 + node_modules/cuint/test/UINT32_or-test.js | 52 + .../cuint/test/UINT32_rotateLeft-test.js | 51 + .../cuint/test/UINT32_rotateRight-test.js | 51 + .../cuint/test/UINT32_shiftLeft-test.js | 73 + .../cuint/test/UINT32_shiftRight-test.js | 95 + .../cuint/test/UINT32_subtract-test.js | 75 + .../cuint/test/UINT32_toNumber-test.js | 63 + .../cuint/test/UINT32_toString-test.js | 74 + node_modules/cuint/test/UINT32_xor-test.js | 64 + node_modules/cuint/test/UINT64-test.js | 284 + node_modules/cuint/test/UINT64_add-test.js | 120 + node_modules/cuint/test/UINT64_and-test.js | 64 + node_modules/cuint/test/UINT64_div-test.js | 105 + node_modules/cuint/test/UINT64_equals-test.js | 62 + .../cuint/test/UINT64_greaterThan-test.js | 52 + .../cuint/test/UINT64_lessThan-test.js | 52 + .../cuint/test/UINT64_multiply-test.js | 75 + node_modules/cuint/test/UINT64_negate-test.js | 51 + node_modules/cuint/test/UINT64_not-test.js | 45 + node_modules/cuint/test/UINT64_or-test.js | 52 + .../cuint/test/UINT64_rotateLeft-test.js | 51 + .../cuint/test/UINT64_rotateRight-test.js | 51 + .../cuint/test/UINT64_shiftLeft-test.js | 73 + .../cuint/test/UINT64_shiftRight-test.js | 95 + .../cuint/test/UINT64_subtract-test.js | 75 + .../cuint/test/UINT64_toNumber-test.js | 63 + .../cuint/test/UINT64_toString-test.js | 74 + node_modules/cuint/test/UINT64_xor-test.js | 64 + node_modules/currently-unhandled/browser.js | 27 + node_modules/currently-unhandled/core.js | 33 + node_modules/currently-unhandled/index.js | 12 + node_modules/currently-unhandled/license | 21 + node_modules/currently-unhandled/package.json | 107 + node_modules/currently-unhandled/readme.md | 44 + node_modules/dashdash/CHANGES.md | 364 + node_modules/dashdash/LICENSE.txt | 24 + node_modules/dashdash/README.md | 574 ++ .../dashdash/etc/dashdash.bash_completion.in | 389 + node_modules/dashdash/lib/dashdash.js | 1055 ++ node_modules/dashdash/package.json | 71 + node_modules/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 | 88 + 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/decamelize/index.js | 13 + node_modules/decamelize/license | 21 + node_modules/decamelize/package.json | 74 + node_modules/decamelize/readme.md | 48 + node_modules/decompress-zip/README.md | 73 + .../decompress-zip/bin/decompress-zip | 83 + node_modules/decompress-zip/changelog.md | 7 + .../decompress-zip/lib/decompress-zip.js | 312 + node_modules/decompress-zip/lib/extractors.js | 184 + .../decompress-zip/lib/file-details.js | 37 + node_modules/decompress-zip/lib/signatures.js | 10 + node_modules/decompress-zip/lib/structures.js | 228 + node_modules/decompress-zip/package.json | 95 + node_modules/deep-extend/CHANGELOG.md | 38 + node_modules/deep-extend/LICENSE | 20 + node_modules/deep-extend/README.md | 93 + node_modules/deep-extend/index.js | 1 + node_modules/deep-extend/lib/deep-extend.js | 150 + node_modules/deep-extend/package.json | 97 + node_modules/delayed-stream/.npmignore | 1 + node_modules/delayed-stream/License | 19 + node_modules/delayed-stream/Makefile | 7 + node_modules/delayed-stream/Readme.md | 141 + .../delayed-stream/lib/delayed_stream.js | 107 + node_modules/delayed-stream/package.json | 66 + node_modules/ecc-jsbn/.npmignore | 15 + node_modules/ecc-jsbn/LICENSE | 21 + node_modules/ecc-jsbn/README.md | 8 + node_modules/ecc-jsbn/index.js | 57 + node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 + node_modules/ecc-jsbn/lib/ec.js | 561 ++ node_modules/ecc-jsbn/lib/sec.js | 170 + node_modules/ecc-jsbn/package.json | 69 + node_modules/ecc-jsbn/test.js | 14 + .../electron-download/collaborators.md | 8 + node_modules/electron-download/lib/cli.js | 18 + node_modules/electron-download/lib/index.js | 300 + .../node_modules/debug/.coveralls.yml | 1 + .../node_modules/debug/.eslintrc | 11 + .../node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../node_modules/debug/LICENSE | 19 + .../node_modules/debug/Makefile | 50 + .../node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 92 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/fs-extra/.npmignore | 8 + .../node_modules/fs-extra/CHANGELOG.md | 733 ++ .../node_modules/fs-extra/LICENSE | 15 + .../node_modules/fs-extra/README.md | 251 + .../node_modules/fs-extra/docs/copy-sync.md | 37 + .../node_modules/fs-extra/docs/copy.md | 48 + .../fs-extra/docs/emptyDir-sync.md | 16 + .../node_modules/fs-extra/docs/emptyDir.md | 21 + .../fs-extra/docs/ensureDir-sync.md | 17 + .../node_modules/fs-extra/docs/ensureDir.md | 20 + .../fs-extra/docs/ensureFile-sync.md | 17 + .../node_modules/fs-extra/docs/ensureFile.md | 20 + .../fs-extra/docs/ensureLink-sync.md | 17 + .../node_modules/fs-extra/docs/ensureLink.md | 20 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + .../fs-extra/docs/ensureSymlink.md | 21 + .../node_modules/fs-extra/docs/move-sync.md | 24 + .../node_modules/fs-extra/docs/move.md | 33 + .../fs-extra/docs/outputFile-sync.md | 19 + .../node_modules/fs-extra/docs/outputFile.md | 23 + .../fs-extra/docs/outputJson-sync.md | 22 + .../node_modules/fs-extra/docs/outputJson.md | 26 + .../fs-extra/docs/readJson-sync.md | 33 + .../node_modules/fs-extra/docs/readJson.md | 40 + .../node_modules/fs-extra/docs/remove-sync.md | 16 + .../node_modules/fs-extra/docs/remove.md | 25 + .../fs-extra/docs/writeJson-sync.md | 21 + .../node_modules/fs-extra/docs/writeJson.md | 27 + .../fs-extra/lib/copy-sync/copy-file-sync.js | 41 + .../fs-extra/lib/copy-sync/copy-sync.js | 62 + .../fs-extra/lib/copy-sync/index.js | 3 + .../node_modules/fs-extra/lib/copy/copy.js | 52 + .../node_modules/fs-extra/lib/copy/index.js | 3 + .../node_modules/fs-extra/lib/copy/ncp.js | 234 + .../node_modules/fs-extra/lib/empty/index.js | 47 + .../node_modules/fs-extra/lib/ensure/file.js | 45 + .../node_modules/fs-extra/lib/ensure/index.js | 23 + .../node_modules/fs-extra/lib/ensure/link.js | 60 + .../fs-extra/lib/ensure/symlink-paths.js | 97 + .../fs-extra/lib/ensure/symlink-type.js | 31 + .../fs-extra/lib/ensure/symlink.js | 64 + .../node_modules/fs-extra/lib/index.js | 37 + .../node_modules/fs-extra/lib/json/index.js | 11 + .../fs-extra/lib/json/jsonfile.js | 16 + .../fs-extra/lib/json/output-json-sync.js | 18 + .../fs-extra/lib/json/output-json.js | 26 + .../node_modules/fs-extra/lib/mkdirs/index.js | 9 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + .../fs-extra/lib/mkdirs/mkdirs.js | 63 + .../node_modules/fs-extra/lib/mkdirs/win32.js | 25 + .../fs-extra/lib/move-sync/index.js | 117 + .../node_modules/fs-extra/lib/move/index.js | 161 + .../node_modules/fs-extra/lib/output/index.js | 37 + .../node_modules/fs-extra/lib/remove/index.js | 17 + .../fs-extra/lib/remove/rimraf.js | 296 + .../node_modules/fs-extra/lib/util/assign.js | 16 + .../node_modules/fs-extra/lib/util/utimes.js | 72 + .../node_modules/fs-extra/package.json | 96 + .../node_modules/minimist/.travis.yml | 8 + .../node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 236 + .../node_modules/minimist/package.json | 77 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/electron-download/package.json | 94 + node_modules/electron-download/readme.md | 73 + node_modules/electron-osx-sign/.eslintrc.json | 242 + node_modules/electron-osx-sign/.gitattributes | 15 + node_modules/electron-osx-sign/.npmignore | 4 + node_modules/electron-osx-sign/.travis.yml | 8 + node_modules/electron-osx-sign/LICENSE | 23 + node_modules/electron-osx-sign/README.md | 473 + .../bin/electron-osx-flat-usage.txt | 41 + .../bin/electron-osx-flat.js | 34 + .../bin/electron-osx-sign-usage.txt | 79 + .../bin/electron-osx-sign.js | 43 + .../default.entitlements.darwin.inherit.plist | 6 + .../default.entitlements.darwin.plist | 6 + .../default.entitlements.mas.inherit.plist | 10 + .../default.entitlements.mas.plist | 8 + node_modules/electron-osx-sign/flat.js | 155 + node_modules/electron-osx-sign/index.d.ts | 37 + node_modules/electron-osx-sign/index.js | 47 + .../node_modules/debug/.coveralls.yml | 1 + .../node_modules/debug/.eslintrc | 11 + .../node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../node_modules/debug/LICENSE | 19 + .../node_modules/debug/Makefile | 50 + .../node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 92 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/minimist/.travis.yml | 8 + .../node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 236 + .../node_modules/minimist/package.json | 77 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/electron-osx-sign/package.json | 86 + node_modules/electron-osx-sign/sign.js | 378 + node_modules/electron-osx-sign/test/basic.js | 29 + .../electron-osx-sign/test/config.json | 23 + node_modules/electron-osx-sign/test/index.js | 28 + node_modules/electron-osx-sign/test/util.js | 90 + .../electron-osx-sign/util-entitlements.js | 102 + .../electron-osx-sign/util-identities.js | 55 + .../util-provisioning-profiles.js | 173 + node_modules/electron-osx-sign/util.js | 260 + node_modules/electron-packager/.eslintignore | 2 + .../electron-packager/.github/config.yml | 43 + .../.github/issue_template.md | 33 + .../electron-packager/.github/no-response.yml | 14 + .../.github/pull_request_template.md | 13 + node_modules/electron-packager/.npmignore | 10 + node_modules/electron-packager/.travis.yml | 35 + .../electron-packager/CODE_OF_CONDUCT.md | 5 + .../electron-packager/CONTRIBUTING.md | 145 + node_modules/electron-packager/LICENSE | 23 + node_modules/electron-packager/NEWS.md | 624 ++ node_modules/electron-packager/SUPPORT.md | 8 + node_modules/electron-packager/cli.js | 56 + .../electron-packager/collaborators.md | 16 + node_modules/electron-packager/common.js | 160 + .../electron-packager/docs/_config.yml | 1 + node_modules/electron-packager/docs/api.md | 434 + node_modules/electron-packager/docs/faq.md | 47 + node_modules/electron-packager/download.js | 39 + node_modules/electron-packager/hooks.js | 25 + node_modules/electron-packager/ignore.js | 94 + node_modules/electron-packager/index.js | 185 + node_modules/electron-packager/infer.js | 140 + node_modules/electron-packager/linux.js | 25 + node_modules/electron-packager/mac.js | 332 + node_modules/electron-packager/package.json | 133 + node_modules/electron-packager/platform.js | 184 + node_modules/electron-packager/prune.js | 65 + node_modules/electron-packager/readme.md | 212 + node_modules/electron-packager/targets.js | 158 + node_modules/electron-packager/test/_setup.js | 105 + node_modules/electron-packager/test/_util.js | 117 + node_modules/electron-packager/test/asar.js | 55 + node_modules/electron-packager/test/basic.js | 347 + .../test/ci/_before_script.js | 5 + .../electron-packager/test/ci/appveyor.yml | 34 + .../test/ci/before_install.sh | 33 + .../electron-packager/test/ci/dev_ca.cnf | 33 + node_modules/electron-packager/test/cli.js | 68 + .../electron-packager/test/config.json | 3 + node_modules/electron-packager/test/darwin.js | 445 + .../basic-renamed-to-electron/index.html | 4 + .../basic-renamed-to-electron/main.js | 24 + .../basic-renamed-to-electron/package.json | 12 + .../fixtures/basic/dir_to_unpack/file1.txt | 0 .../basic/electron-packager/readme.txt | 2 + .../test/fixtures/basic/file_to_unpack.pac | 1 + .../test/fixtures/basic/ignore.o | 0 .../test/fixtures/basic/ignore.obj | 0 .../test/fixtures/basic/ignore/this.txt | 0 .../test/fixtures/basic/ignorethis.txt | 1 + .../test/fixtures/basic/index.html | 4 + .../test/fixtures/basic/main.js | 24 + .../test/fixtures/basic/package.json | 16 + .../electron-packager/test/fixtures/data1.txt | 1 + .../test/fixtures/el-0374/index.html | 4 + .../test/fixtures/el-0374/main.js | 24 + .../test/fixtures/el-0374/package.json | 12 + .../electron-in-dependencies/index.html | 4 + .../fixtures/electron-in-dependencies/main.js | 1 + .../electron-in-dependencies/package.json | 8 + .../test/fixtures/extrainfo.plist | 30 + .../fixtures/infer-bad-fields/package.json | 9 + .../package.json | 7 + .../infer-malformed-json/package.json | 2 + .../infer-missing-fields/package.json | 5 + .../infer-missing-version-only/package.json | 7 + .../package.json | 7 + .../fixtures/infer-win32metadata/package.json | 9 + .../test/fixtures/monochrome.icns | Bin 0 -> 274820 bytes .../test/fixtures/monochrome.ico | Bin 0 -> 15086 bytes node_modules/electron-packager/test/hooks.js | 80 + node_modules/electron-packager/test/ignore.js | 113 + node_modules/electron-packager/test/index.js | 19 + node_modules/electron-packager/test/infer.js | 121 + node_modules/electron-packager/test/mas.js | 58 + node_modules/electron-packager/test/prune.js | 65 + .../electron-packager/test/targets.js | 133 + node_modules/electron-packager/test/win32.js | 215 + node_modules/electron-packager/usage.txt | 100 + node_modules/electron-packager/win32.js | 114 + node_modules/env-paths/index.js | 69 + node_modules/env-paths/license | 21 + node_modules/env-paths/package.json | 82 + node_modules/env-paths/readme.md | 71 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 133 + node_modules/error-ex/package.json | 90 + node_modules/extend/.eslintrc | 17 + node_modules/extend/.jscs.json | 175 + node_modules/extend/.npmignore | 1 + node_modules/extend/.travis.yml | 179 + node_modules/extend/CHANGELOG.md | 77 + node_modules/extend/LICENSE | 23 + node_modules/extend/README.md | 81 + node_modules/extend/component.json | 32 + node_modules/extend/index.js | 86 + node_modules/extend/package.json | 79 + node_modules/extract-zip/.npmignore | 1 + node_modules/extract-zip/.travis.yml | 7 + node_modules/extract-zip/CONTRIBUTING.md | 1 + node_modules/extract-zip/LICENSE | 23 + node_modules/extract-zip/cli.js | 20 + node_modules/extract-zip/index.js | 205 + .../extract-zip/node_modules/.bin/mkdirp | 1 + .../node_modules/debug/.coveralls.yml | 1 + .../extract-zip/node_modules/debug/.eslintrc | 11 + .../extract-zip/node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../extract-zip/node_modules/debug/LICENSE | 19 + .../extract-zip/node_modules/debug/Makefile | 50 + .../extract-zip/node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../extract-zip/node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 92 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/mkdirp/.npmignore | 2 + .../node_modules/mkdirp/.travis.yml | 5 + .../extract-zip/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 + .../extract-zip/node_modules/mkdirp/index.js | 97 + .../node_modules/mkdirp/package.json | 66 + .../node_modules/mkdirp/readme.markdown | 100 + .../node_modules/mkdirp/test/chmod.js | 38 + .../node_modules/mkdirp/test/clobber.js | 37 + .../node_modules/mkdirp/test/mkdirp.js | 26 + .../node_modules/mkdirp/test/opts_fs.js | 27 + .../node_modules/mkdirp/test/opts_fs_sync.js | 25 + .../node_modules/mkdirp/test/perm.js | 30 + .../node_modules/mkdirp/test/perm_sync.js | 34 + .../node_modules/mkdirp/test/race.js | 40 + .../node_modules/mkdirp/test/rel.js | 30 + .../node_modules/mkdirp/test/return.js | 25 + .../node_modules/mkdirp/test/return_sync.js | 24 + .../node_modules/mkdirp/test/root.js | 18 + .../node_modules/mkdirp/test/sync.js | 30 + .../node_modules/mkdirp/test/umask.js | 26 + .../node_modules/mkdirp/test/umask_sync.js | 30 + node_modules/extract-zip/package.json | 76 + node_modules/extract-zip/readme.md | 49 + node_modules/extsprintf/.gitmodules | 0 node_modules/extsprintf/.npmignore | 2 + node_modules/extsprintf/LICENSE | 19 + node_modules/extsprintf/Makefile | 24 + node_modules/extsprintf/Makefile.targ | 285 + node_modules/extsprintf/README.md | 46 + node_modules/extsprintf/jsl.node.conf | 137 + node_modules/extsprintf/lib/extsprintf.js | 183 + node_modules/extsprintf/package.json | 48 + node_modules/fast-deep-equal/LICENSE | 21 + node_modules/fast-deep-equal/README.md | 55 + node_modules/fast-deep-equal/index.d.ts | 4 + node_modules/fast-deep-equal/index.js | 55 + node_modules/fast-deep-equal/package.json | 89 + .../fast-json-stable-stringify/.eslintrc.yml | 26 + .../fast-json-stable-stringify/.npmignore | 4 + .../fast-json-stable-stringify/.travis.yml | 8 + .../fast-json-stable-stringify/LICENSE | 18 + .../fast-json-stable-stringify/README.md | 119 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../fast-json-stable-stringify/example/str.js | 3 + .../example/value_cmp.js | 7 + .../fast-json-stable-stringify/index.js | 59 + .../fast-json-stable-stringify/package.json | 82 + .../fast-json-stable-stringify/test/cmp.js | 13 + .../fast-json-stable-stringify/test/nested.js | 44 + .../fast-json-stable-stringify/test/str.js | 46 + .../test/to-json.js | 22 + node_modules/fd-slicer/.npmignore | 2 + node_modules/fd-slicer/.travis.yml | 7 + node_modules/fd-slicer/CHANGELOG.md | 49 + node_modules/fd-slicer/LICENSE | 21 + node_modules/fd-slicer/README.md | 189 + node_modules/fd-slicer/index.js | 277 + node_modules/fd-slicer/package.json | 69 + node_modules/fd-slicer/test/test.js | 350 + node_modules/find-up/index.js | 53 + node_modules/find-up/license | 21 + .../find-up/node_modules/path-exists/index.js | 24 + .../find-up/node_modules/path-exists/license | 21 + .../node_modules/path-exists/package.json | 76 + .../node_modules/path-exists/readme.md | 45 + node_modules/find-up/package.json | 89 + node_modules/find-up/readme.md | 72 + node_modules/flora-colossus/.npmignore | 2 + node_modules/flora-colossus/.travis.yml | 7 + node_modules/flora-colossus/README.md | 43 + node_modules/flora-colossus/lib/Walker.d.ts | 32 + node_modules/flora-colossus/lib/Walker.js | 263 + node_modules/flora-colossus/lib/Walker.js.map | 1 + node_modules/flora-colossus/lib/depTypes.d.ts | 9 + node_modules/flora-colossus/lib/depTypes.js | 92 + .../flora-colossus/lib/depTypes.js.map | 1 + node_modules/flora-colossus/lib/index.d.ts | 2 + node_modules/flora-colossus/lib/index.js | 8 + node_modules/flora-colossus/lib/index.js.map | 1 + .../node_modules/fs-extra/CHANGELOG.md | 796 ++ .../node_modules/fs-extra/LICENSE | 15 + .../node_modules/fs-extra/README.md | 242 + .../node_modules/fs-extra/docs/copy-sync.md | 37 + .../node_modules/fs-extra/docs/copy.md | 57 + .../fs-extra/docs/emptyDir-sync.md | 16 + .../node_modules/fs-extra/docs/emptyDir.md | 30 + .../fs-extra/docs/ensureDir-sync.md | 17 + .../node_modules/fs-extra/docs/ensureDir.md | 29 + .../fs-extra/docs/ensureFile-sync.md | 17 + .../node_modules/fs-extra/docs/ensureFile.md | 29 + .../fs-extra/docs/ensureLink-sync.md | 17 + .../node_modules/fs-extra/docs/ensureLink.md | 29 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + .../fs-extra/docs/ensureSymlink.md | 30 + .../fs-extra/docs/fs-read-write.md | 39 + .../node_modules/fs-extra/docs/move-sync.md | 24 + .../node_modules/fs-extra/docs/move.md | 41 + .../fs-extra/docs/outputFile-sync.md | 19 + .../node_modules/fs-extra/docs/outputFile.md | 34 + .../fs-extra/docs/outputJson-sync.md | 25 + .../node_modules/fs-extra/docs/outputJson.md | 40 + .../fs-extra/docs/pathExists-sync.md | 3 + .../node_modules/fs-extra/docs/pathExists.md | 22 + .../fs-extra/docs/readJson-sync.md | 33 + .../node_modules/fs-extra/docs/readJson.md | 58 + .../node_modules/fs-extra/docs/remove-sync.md | 16 + .../node_modules/fs-extra/docs/remove.md | 34 + .../fs-extra/docs/writeJson-sync.md | 24 + .../node_modules/fs-extra/docs/writeJson.md | 39 + .../fs-extra/lib/copy-sync/copy-file-sync.js | 41 + .../fs-extra/lib/copy-sync/copy-sync.js | 62 + .../fs-extra/lib/copy-sync/index.js | 3 + .../node_modules/fs-extra/lib/copy/copy.js | 54 + .../node_modules/fs-extra/lib/copy/index.js | 4 + .../node_modules/fs-extra/lib/copy/ncp.js | 234 + .../node_modules/fs-extra/lib/empty/index.js | 48 + .../node_modules/fs-extra/lib/ensure/file.js | 49 + .../node_modules/fs-extra/lib/ensure/index.js | 23 + .../node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + .../fs-extra/lib/ensure/symlink.js | 66 + .../node_modules/fs-extra/lib/fs/index.js | 107 + .../node_modules/fs-extra/lib/index.js | 22 + .../node_modules/fs-extra/lib/json/index.js | 16 + .../fs-extra/lib/json/jsonfile.js | 12 + .../fs-extra/lib/json/output-json-sync.js | 18 + .../fs-extra/lib/json/output-json.js | 27 + .../node_modules/fs-extra/lib/mkdirs/index.js | 14 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + .../fs-extra/lib/mkdirs/mkdirs.js | 63 + .../node_modules/fs-extra/lib/mkdirs/win32.js | 25 + .../fs-extra/lib/move-sync/index.js | 118 + .../node_modules/fs-extra/lib/move/index.js | 170 + .../node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + .../node_modules/fs-extra/lib/remove/index.js | 9 + .../fs-extra/lib/remove/rimraf.js | 314 + .../node_modules/fs-extra/lib/util/assign.js | 16 + .../node_modules/fs-extra/lib/util/buffer.js | 11 + .../node_modules/fs-extra/lib/util/utimes.js | 72 + .../node_modules/fs-extra/package.json | 99 + .../node_modules/jsonfile/CHANGELOG.md | 145 + .../node_modules/jsonfile/LICENSE | 15 + .../node_modules/jsonfile/README.md | 168 + .../node_modules/jsonfile/index.js | 134 + .../node_modules/jsonfile/package.json | 75 + node_modules/flora-colossus/package.json | 68 + node_modules/flora-colossus/tsconfig.json | 32 + node_modules/flora-colossus/yarn.lock | 1521 +++ node_modules/forever-agent/LICENSE | 55 + node_modules/forever-agent/README.md | 4 + node_modules/forever-agent/index.js | 138 + node_modules/forever-agent/package.json | 54 + node_modules/form-data/License | 19 + node_modules/form-data/README.md | 234 + node_modules/form-data/README.md.bak | 234 + node_modules/form-data/lib/browser.js | 2 + node_modules/form-data/lib/form_data.js | 457 + node_modules/form-data/lib/populate.js | 10 + node_modules/form-data/package.json | 102 + node_modules/fs-extra/CHANGELOG.md | 812 ++ node_modules/fs-extra/LICENSE | 15 + node_modules/fs-extra/README.md | 242 + node_modules/fs-extra/docs/copy-sync.md | 37 + node_modules/fs-extra/docs/copy.md | 57 + node_modules/fs-extra/docs/emptyDir-sync.md | 16 + node_modules/fs-extra/docs/emptyDir.md | 30 + node_modules/fs-extra/docs/ensureDir-sync.md | 17 + node_modules/fs-extra/docs/ensureDir.md | 29 + node_modules/fs-extra/docs/ensureFile-sync.md | 17 + node_modules/fs-extra/docs/ensureFile.md | 29 + node_modules/fs-extra/docs/ensureLink-sync.md | 17 + node_modules/fs-extra/docs/ensureLink.md | 29 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + node_modules/fs-extra/docs/ensureSymlink.md | 30 + node_modules/fs-extra/docs/fs-read-write.md | 39 + node_modules/fs-extra/docs/move-sync.md | 24 + node_modules/fs-extra/docs/move.md | 41 + node_modules/fs-extra/docs/outputFile-sync.md | 19 + node_modules/fs-extra/docs/outputFile.md | 34 + node_modules/fs-extra/docs/outputJson-sync.md | 25 + node_modules/fs-extra/docs/outputJson.md | 40 + node_modules/fs-extra/docs/pathExists-sync.md | 3 + node_modules/fs-extra/docs/pathExists.md | 22 + node_modules/fs-extra/docs/readJson-sync.md | 33 + node_modules/fs-extra/docs/readJson.md | 58 + node_modules/fs-extra/docs/remove-sync.md | 16 + node_modules/fs-extra/docs/remove.md | 34 + node_modules/fs-extra/docs/writeJson-sync.md | 24 + node_modules/fs-extra/docs/writeJson.md | 39 + .../fs-extra/lib/copy-sync/copy-sync.js | 209 + node_modules/fs-extra/lib/copy-sync/index.js | 3 + node_modules/fs-extra/lib/copy/copy.js | 264 + node_modules/fs-extra/lib/copy/index.js | 4 + node_modules/fs-extra/lib/empty/index.js | 48 + node_modules/fs-extra/lib/ensure/file.js | 49 + node_modules/fs-extra/lib/ensure/index.js | 23 + node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + node_modules/fs-extra/lib/ensure/symlink.js | 66 + node_modules/fs-extra/lib/fs/index.js | 107 + node_modules/fs-extra/lib/index.js | 22 + node_modules/fs-extra/lib/json/index.js | 16 + node_modules/fs-extra/lib/json/jsonfile.js | 12 + .../fs-extra/lib/json/output-json-sync.js | 18 + node_modules/fs-extra/lib/json/output-json.js | 27 + node_modules/fs-extra/lib/mkdirs/index.js | 14 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + node_modules/fs-extra/lib/mkdirs/mkdirs.js | 63 + node_modules/fs-extra/lib/mkdirs/win32.js | 25 + node_modules/fs-extra/lib/move-sync/index.js | 118 + node_modules/fs-extra/lib/move/index.js | 170 + node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + node_modules/fs-extra/lib/remove/index.js | 9 + node_modules/fs-extra/lib/remove/rimraf.js | 314 + node_modules/fs-extra/lib/util/assign.js | 16 + node_modules/fs-extra/lib/util/buffer.js | 11 + node_modules/fs-extra/lib/util/utimes.js | 79 + .../node_modules/jsonfile/CHANGELOG.md | 145 + .../fs-extra/node_modules/jsonfile/LICENSE | 15 + .../fs-extra/node_modules/jsonfile/README.md | 168 + .../fs-extra/node_modules/jsonfile/index.js | 134 + .../node_modules/jsonfile/package.json | 75 + node_modules/fs-extra/package.json | 101 + node_modules/fs.realpath/LICENSE | 43 + node_modules/fs.realpath/README.md | 33 + node_modules/fs.realpath/index.js | 66 + node_modules/fs.realpath/old.js | 303 + node_modules/fs.realpath/package.json | 63 + node_modules/galactus/.npmignore | 2 + .../00c728c3437da37b0c97398e7e596f35.json | 1 + .../b1b801e11369500b7ee32c579e280104.json | 1 + node_modules/galactus/README.md | 46 + .../galactus/lib/DestroyerOfModules.d.ts | 18 + .../galactus/lib/DestroyerOfModules.js | 164 + .../galactus/lib/DestroyerOfModules.js.map | 1 + node_modules/galactus/lib/index.d.ts | 2 + node_modules/galactus/lib/index.js | 8 + node_modules/galactus/lib/index.js.map | 1 + .../node_modules/fs-extra/CHANGELOG.md | 796 ++ .../galactus/node_modules/fs-extra/LICENSE | 15 + .../galactus/node_modules/fs-extra/README.md | 242 + .../node_modules/fs-extra/docs/copy-sync.md | 37 + .../node_modules/fs-extra/docs/copy.md | 57 + .../fs-extra/docs/emptyDir-sync.md | 16 + .../node_modules/fs-extra/docs/emptyDir.md | 30 + .../fs-extra/docs/ensureDir-sync.md | 17 + .../node_modules/fs-extra/docs/ensureDir.md | 29 + .../fs-extra/docs/ensureFile-sync.md | 17 + .../node_modules/fs-extra/docs/ensureFile.md | 29 + .../fs-extra/docs/ensureLink-sync.md | 17 + .../node_modules/fs-extra/docs/ensureLink.md | 29 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + .../fs-extra/docs/ensureSymlink.md | 30 + .../fs-extra/docs/fs-read-write.md | 39 + .../node_modules/fs-extra/docs/move-sync.md | 24 + .../node_modules/fs-extra/docs/move.md | 41 + .../fs-extra/docs/outputFile-sync.md | 19 + .../node_modules/fs-extra/docs/outputFile.md | 34 + .../fs-extra/docs/outputJson-sync.md | 25 + .../node_modules/fs-extra/docs/outputJson.md | 40 + .../fs-extra/docs/pathExists-sync.md | 3 + .../node_modules/fs-extra/docs/pathExists.md | 22 + .../fs-extra/docs/readJson-sync.md | 33 + .../node_modules/fs-extra/docs/readJson.md | 58 + .../node_modules/fs-extra/docs/remove-sync.md | 16 + .../node_modules/fs-extra/docs/remove.md | 34 + .../fs-extra/docs/writeJson-sync.md | 24 + .../node_modules/fs-extra/docs/writeJson.md | 39 + .../fs-extra/lib/copy-sync/copy-file-sync.js | 41 + .../fs-extra/lib/copy-sync/copy-sync.js | 62 + .../fs-extra/lib/copy-sync/index.js | 3 + .../node_modules/fs-extra/lib/copy/copy.js | 54 + .../node_modules/fs-extra/lib/copy/index.js | 4 + .../node_modules/fs-extra/lib/copy/ncp.js | 234 + .../node_modules/fs-extra/lib/empty/index.js | 48 + .../node_modules/fs-extra/lib/ensure/file.js | 49 + .../node_modules/fs-extra/lib/ensure/index.js | 23 + .../node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + .../fs-extra/lib/ensure/symlink.js | 66 + .../node_modules/fs-extra/lib/fs/index.js | 107 + .../node_modules/fs-extra/lib/index.js | 22 + .../node_modules/fs-extra/lib/json/index.js | 16 + .../fs-extra/lib/json/jsonfile.js | 12 + .../fs-extra/lib/json/output-json-sync.js | 18 + .../fs-extra/lib/json/output-json.js | 27 + .../node_modules/fs-extra/lib/mkdirs/index.js | 14 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + .../fs-extra/lib/mkdirs/mkdirs.js | 63 + .../node_modules/fs-extra/lib/mkdirs/win32.js | 25 + .../fs-extra/lib/move-sync/index.js | 118 + .../node_modules/fs-extra/lib/move/index.js | 170 + .../node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + .../node_modules/fs-extra/lib/remove/index.js | 9 + .../fs-extra/lib/remove/rimraf.js | 314 + .../node_modules/fs-extra/lib/util/assign.js | 16 + .../node_modules/fs-extra/lib/util/buffer.js | 11 + .../node_modules/fs-extra/lib/util/utimes.js | 72 + .../node_modules/fs-extra/package.json | 99 + .../node_modules/jsonfile/CHANGELOG.md | 145 + .../galactus/node_modules/jsonfile/LICENSE | 15 + .../galactus/node_modules/jsonfile/README.md | 168 + .../galactus/node_modules/jsonfile/index.js | 134 + .../node_modules/jsonfile/package.json | 75 + node_modules/galactus/package.json | 82 + node_modules/galactus/tsconfig.json | 32 + node_modules/galactus/tslint.json | 12 + node_modules/galactus/yarn.lock | 1554 +++ node_modules/get-package-info/.babelrc | 5 + node_modules/get-package-info/.npmignore | 4 + node_modules/get-package-info/.travis.yml | 4 + node_modules/get-package-info/LICENSE | 9 + node_modules/get-package-info/README.md | 66 + node_modules/get-package-info/lib/index.js | 88 + .../node_modules/debug/.coveralls.yml | 1 + .../node_modules/debug/.eslintrc | 11 + .../node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../node_modules/debug/LICENSE | 19 + .../node_modules/debug/Makefile | 50 + .../node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 92 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/find-up/index.js | 48 + .../node_modules/find-up/license | 21 + .../node_modules/find-up/package.json | 89 + .../node_modules/find-up/readme.md | 85 + .../node_modules/load-json-file/index.js | 11 + .../node_modules/load-json-file/license | 21 + .../node_modules/load-json-file/package.json | 79 + .../node_modules/load-json-file/readme.md | 45 + .../node_modules/path-type/index.js | 26 + .../node_modules/path-type/license | 21 + .../node_modules/path-type/package.json | 84 + .../node_modules/path-type/readme.md | 42 + .../node_modules/pify/index.js | 68 + .../node_modules/pify/license | 21 + .../node_modules/pify/package.json | 85 + .../node_modules/pify/readme.md | 119 + .../node_modules/read-pkg-up/index.js | 26 + .../node_modules/read-pkg-up/license | 21 + .../node_modules/read-pkg-up/package.json | 98 + .../node_modules/read-pkg-up/readme.md | 80 + .../node_modules/read-pkg/index.js | 47 + .../node_modules/read-pkg/license | 21 + .../node_modules/read-pkg/package.json | 81 + .../node_modules/read-pkg/readme.md | 79 + .../node_modules/strip-bom/index.js | 14 + .../node_modules/strip-bom/license | 21 + .../node_modules/strip-bom/package.json | 76 + .../node_modules/strip-bom/readme.md | 36 + node_modules/get-package-info/package.json | 81 + .../we/need/to/go/deeper/package.json | 4 + .../node_modules/we/need/to/go/package.json | 5 + .../test/node_modules/we/package.json | 11 + node_modules/get-package-info/test/test.js | 114 + node_modules/get-stdin/index.js | 49 + node_modules/get-stdin/package.json | 72 + node_modules/get-stdin/readme.md | 44 + node_modules/getpass/.npmignore | 8 + node_modules/getpass/.travis.yml | 9 + node_modules/getpass/LICENSE | 18 + node_modules/getpass/README.md | 32 + node_modules/getpass/lib/index.js | 123 + node_modules/getpass/package.json | 54 + node_modules/glob/LICENSE | 15 + node_modules/glob/README.md | 359 + node_modules/glob/common.js | 226 + node_modules/glob/glob.js | 765 ++ node_modules/glob/package.json | 79 + node_modules/glob/sync.js | 460 + node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 133 + node_modules/graceful-fs/fs.js | 21 + node_modules/graceful-fs/graceful-fs.js | 262 + node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 93 + node_modules/graceful-fs/polyfills.js | 330 + node_modules/har-schema/LICENSE | 13 + node_modules/har-schema/README.md | 49 + node_modules/har-schema/lib/afterRequest.json | 30 + .../har-schema/lib/beforeRequest.json | 30 + node_modules/har-schema/lib/browser.json | 20 + node_modules/har-schema/lib/cache.json | 21 + node_modules/har-schema/lib/content.json | 29 + node_modules/har-schema/lib/cookie.json | 36 + node_modules/har-schema/lib/creator.json | 20 + node_modules/har-schema/lib/entry.json | 53 + node_modules/har-schema/lib/har.json | 13 + node_modules/har-schema/lib/header.json | 20 + node_modules/har-schema/lib/index.js | 22 + node_modules/har-schema/lib/log.json | 36 + node_modules/har-schema/lib/page.json | 32 + node_modules/har-schema/lib/pageTimings.json | 18 + node_modules/har-schema/lib/postData.json | 43 + node_modules/har-schema/lib/query.json | 20 + node_modules/har-schema/lib/request.json | 57 + node_modules/har-schema/lib/response.json | 54 + node_modules/har-schema/lib/timings.json | 42 + node_modules/har-schema/package.json | 90 + node_modules/har-validator/LICENSE | 13 + node_modules/har-validator/README.md | 54 + node_modules/har-validator/lib/async.js | 98 + node_modules/har-validator/lib/error.js | 17 + node_modules/har-validator/lib/promise.js | 95 + node_modules/har-validator/package.json | 79 + node_modules/hawk/.npmignore | 5 + node_modules/hawk/LICENSE | 28 + node_modules/hawk/README.md | 637 ++ node_modules/hawk/client.js | 3 + node_modules/hawk/lib/browser.js | 653 ++ node_modules/hawk/lib/client.js | 394 + node_modules/hawk/lib/crypto.js | 128 + node_modules/hawk/lib/index.js | 17 + node_modules/hawk/lib/server.js | 550 + node_modules/hawk/lib/utils.js | 186 + node_modules/hawk/package.json | 82 + node_modules/hoek/.npmignore | 3 + node_modules/hoek/LICENSE | 32 + node_modules/hoek/README.md | 30 + node_modules/hoek/lib/escape.js | 168 + node_modules/hoek/lib/index.js | 978 ++ node_modules/hoek/package.json | 62 + node_modules/hosted-git-info/CHANGELOG.md | 17 + node_modules/hosted-git-info/LICENSE | 13 + node_modules/hosted-git-info/README.md | 133 + node_modules/hosted-git-info/git-host-info.js | 78 + node_modules/hosted-git-info/git-host.js | 129 + node_modules/hosted-git-info/index.js | 121 + node_modules/hosted-git-info/package.json | 75 + node_modules/http-signature/.dir-locals.el | 6 + node_modules/http-signature/.npmignore | 7 + node_modules/http-signature/CHANGES.md | 46 + node_modules/http-signature/LICENSE | 18 + node_modules/http-signature/README.md | 79 + node_modules/http-signature/http_signing.md | 363 + node_modules/http-signature/lib/index.js | 29 + node_modules/http-signature/lib/parser.js | 315 + node_modules/http-signature/lib/signer.js | 401 + node_modules/http-signature/lib/utils.js | 112 + node_modules/http-signature/lib/verify.js | 88 + node_modules/http-signature/package.json | 81 + node_modules/indent-string/index.js | 20 + node_modules/indent-string/license | 21 + node_modules/indent-string/package.json | 72 + node_modules/indent-string/readme.md | 58 + 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 | 7 + node_modules/inherits/inherits_browser.js | 23 + node_modules/inherits/package.json | 69 + node_modules/ini/LICENSE | 15 + node_modules/ini/README.md | 102 + node_modules/ini/ini.js | 194 + node_modules/ini/package.json | 67 + node_modules/is-arrayish/.editorconfig | 18 + node_modules/is-arrayish/.istanbul.yml | 4 + node_modules/is-arrayish/.npmignore | 5 + node_modules/is-arrayish/.travis.yml | 17 + node_modules/is-arrayish/LICENSE | 21 + node_modules/is-arrayish/README.md | 16 + node_modules/is-arrayish/index.js | 10 + node_modules/is-arrayish/package.json | 70 + node_modules/is-builtin-module/index.js | 10 + node_modules/is-builtin-module/license | 21 + node_modules/is-builtin-module/package.json | 79 + node_modules/is-builtin-module/readme.md | 33 + node_modules/is-finite/index.js | 6 + node_modules/is-finite/license | 21 + node_modules/is-finite/package.json | 72 + node_modules/is-finite/readme.md | 28 + node_modules/is-fullwidth-code-point/index.js | 46 + node_modules/is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 81 + .../is-fullwidth-code-point/readme.md | 39 + node_modules/is-promise/.npmignore | 6 + node_modules/is-promise/.travis.yml | 3 + node_modules/is-promise/LICENSE | 19 + node_modules/is-promise/index.js | 5 + node_modules/is-promise/package.json | 55 + node_modules/is-promise/readme.md | 29 + node_modules/is-typedarray/LICENSE.md | 18 + node_modules/is-typedarray/README.md | 16 + node_modules/is-typedarray/index.js | 41 + node_modules/is-typedarray/package.json | 63 + node_modules/is-typedarray/test.js | 34 + node_modules/is-utf8/LICENSE | 9 + node_modules/is-utf8/README.md | 16 + node_modules/is-utf8/is-utf8.js | 76 + node_modules/is-utf8/package.json | 57 + node_modules/isarray/README.md | 54 + node_modules/isarray/build/build.js | 209 + node_modules/isarray/component.json | 19 + node_modules/isarray/index.js | 3 + node_modules/isarray/package.json | 61 + node_modules/isbinaryfile/LICENSE.txt | 22 + node_modules/isbinaryfile/README.md | 78 + node_modules/isbinaryfile/index.js | 128 + node_modules/isbinaryfile/package.json | 66 + node_modules/isstream/.jshintrc | 59 + node_modules/isstream/.npmignore | 1 + node_modules/isstream/.travis.yml | 12 + node_modules/isstream/LICENSE.md | 11 + node_modules/isstream/README.md | 66 + node_modules/isstream/isstream.js | 27 + node_modules/isstream/package.json | 65 + node_modules/isstream/test.js | 168 + node_modules/jsbn/.npmignore | 2 + node_modules/jsbn/LICENSE | 40 + node_modules/jsbn/README.md | 175 + node_modules/jsbn/example.html | 12 + node_modules/jsbn/example.js | 3 + node_modules/jsbn/index.js | 1357 +++ node_modules/jsbn/package.json | 58 + .../json-schema-traverse/.eslintrc.yml | 27 + node_modules/json-schema-traverse/.npmignore | 60 + node_modules/json-schema-traverse/.travis.yml | 8 + node_modules/json-schema-traverse/LICENSE | 21 + node_modules/json-schema-traverse/README.md | 69 + node_modules/json-schema-traverse/index.js | 81 + .../json-schema-traverse/package.json | 74 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 102 + node_modules/json-schema/README.md | 5 + .../json-schema/draft-00/hyper-schema | 68 + node_modules/json-schema/draft-00/json-ref | 26 + node_modules/json-schema/draft-00/links | 33 + node_modules/json-schema/draft-00/schema | 155 + .../json-schema/draft-01/hyper-schema | 68 + node_modules/json-schema/draft-01/json-ref | 26 + node_modules/json-schema/draft-01/links | 33 + node_modules/json-schema/draft-01/schema | 155 + .../json-schema/draft-02/hyper-schema | 68 + node_modules/json-schema/draft-02/json-ref | 26 + node_modules/json-schema/draft-02/links | 35 + node_modules/json-schema/draft-02/schema | 166 + .../json-schema/draft-03/examples/address | 20 + .../json-schema/draft-03/examples/calendar | 53 + .../json-schema/draft-03/examples/card | 105 + .../json-schema/draft-03/examples/geo | 8 + .../json-schema/draft-03/examples/interfaces | 23 + .../json-schema/draft-03/hyper-schema | 60 + node_modules/json-schema/draft-03/json-ref | 26 + node_modules/json-schema/draft-03/links | 35 + node_modules/json-schema/draft-03/schema | 174 + .../json-schema/draft-04/hyper-schema | 60 + node_modules/json-schema/draft-04/links | 41 + node_modules/json-schema/draft-04/schema | 189 + .../json-schema/draft-zyp-json-schema-03.xml | 1120 +++ .../json-schema/draft-zyp-json-schema-04.xml | 1072 ++ node_modules/json-schema/lib/links.js | 66 + node_modules/json-schema/lib/validate.js | 273 + node_modules/json-schema/package.json | 75 + node_modules/json-schema/test/tests.js | 95 + node_modules/json-stringify-safe/.npmignore | 1 + node_modules/json-stringify-safe/CHANGELOG.md | 14 + node_modules/json-stringify-safe/LICENSE | 15 + node_modules/json-stringify-safe/Makefile | 35 + node_modules/json-stringify-safe/README.md | 52 + node_modules/json-stringify-safe/package.json | 70 + node_modules/json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + node_modules/jsonfile/.npmignore | 2 + node_modules/jsonfile/CHANGELOG.md | 126 + node_modules/jsonfile/LICENSE | 15 + node_modules/jsonfile/README.md | 162 + node_modules/jsonfile/appveyor.yml | 28 + node_modules/jsonfile/index.js | 133 + node_modules/jsonfile/package.json | 74 + node_modules/jsprim/CHANGES.md | 49 + node_modules/jsprim/CONTRIBUTING.md | 19 + node_modules/jsprim/LICENSE | 19 + node_modules/jsprim/README.md | 287 + node_modules/jsprim/lib/jsprim.js | 735 ++ node_modules/jsprim/package.json | 53 + node_modules/klaw/.npmignore | 3 + node_modules/klaw/CHANGELOG.md | 42 + node_modules/klaw/LICENSE | 15 + node_modules/klaw/README.md | 270 + node_modules/klaw/package.json | 74 + node_modules/klaw/src/assign.js | 16 + node_modules/klaw/src/index.js | 57 + node_modules/load-json-file/index.js | 21 + node_modules/load-json-file/license | 21 + .../load-json-file/node_modules/pify/index.js | 68 + .../load-json-file/node_modules/pify/license | 21 + .../node_modules/pify/package.json | 84 + .../node_modules/pify/readme.md | 119 + node_modules/load-json-file/package.json | 82 + node_modules/load-json-file/readme.md | 45 + node_modules/locate-path/index.js | 24 + node_modules/locate-path/license | 21 + node_modules/locate-path/package.json | 83 + node_modules/locate-path/readme.md | 99 + node_modules/lodash.get/LICENSE | 47 + node_modules/lodash.get/README.md | 18 + node_modules/lodash.get/index.js | 931 ++ node_modules/lodash.get/package.json | 73 + node_modules/loud-rejection/api.js | 11 + node_modules/loud-rejection/index.js | 36 + node_modules/loud-rejection/license | 21 + node_modules/loud-rejection/package.json | 95 + node_modules/loud-rejection/readme.md | 68 + node_modules/loud-rejection/register.js | 2 + node_modules/map-obj/index.js | 13 + node_modules/map-obj/license | 21 + node_modules/map-obj/package.json | 73 + node_modules/map-obj/readme.md | 29 + node_modules/meow/index.js | 82 + node_modules/meow/license | 21 + .../meow/node_modules/minimist/.travis.yml | 8 + .../meow/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../meow/node_modules/minimist/index.js | 236 + .../meow/node_modules/minimist/package.json | 77 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../meow/node_modules/minimist/test/bool.js | 166 + .../meow/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../meow/node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../meow/node_modules/minimist/test/long.js | 31 + .../meow/node_modules/minimist/test/num.js | 36 + .../meow/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../meow/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/meow/package.json | 94 + node_modules/meow/readme.md | 159 + node_modules/mime-db/HISTORY.md | 368 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 94 + node_modules/mime-db/db.json | 7088 +++++++++++++ node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 104 + node_modules/mime-types/HISTORY.md | 260 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 108 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 91 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 209 + node_modules/minimatch/minimatch.js | 923 ++ node_modules/minimatch/package.json | 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 | 76 + 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/mkpath/.npmignore | 1 + node_modules/mkpath/LICENSE | 7 + node_modules/mkpath/README.md | 27 + node_modules/mkpath/mkpath.js | 59 + node_modules/mkpath/package.json | 61 + node_modules/mkpath/test/chmod.js | 42 + node_modules/mkpath/test/clobber.js | 41 + node_modules/mkpath/test/mkpath.js | 32 + node_modules/mkpath/test/perm.js | 36 + node_modules/mkpath/test/perm_sync.js | 43 + node_modules/mkpath/test/rel.js | 36 + node_modules/mkpath/test/root.js | 22 + node_modules/mkpath/test/sync.js | 36 + node_modules/mkpath/test/umask.js | 32 + node_modules/mkpath/test/umask_sync.js | 36 + node_modules/mksnapshot/LICENSE.md | 20 + node_modules/mksnapshot/README.md | 25 + node_modules/mksnapshot/lib/main.js | 30 + .../mksnapshot/lib/mksnapshot-call.js | 37 + .../mksnapshot/lib/mksnapshot-path.js | 86 + .../node_modules/fs-extra/.npmignore | 8 + .../node_modules/fs-extra/CHANGELOG.md | 726 ++ .../mksnapshot/node_modules/fs-extra/LICENSE | 15 + .../node_modules/fs-extra/README.md | 586 ++ .../fs-extra/lib/copy-sync/copy-file-sync.js | 39 + .../fs-extra/lib/copy-sync/copy-sync.js | 47 + .../fs-extra/lib/copy-sync/index.js | 3 + .../node_modules/fs-extra/lib/copy/copy.js | 44 + .../node_modules/fs-extra/lib/copy/index.js | 3 + .../node_modules/fs-extra/lib/copy/ncp.js | 243 + .../node_modules/fs-extra/lib/empty/index.js | 47 + .../node_modules/fs-extra/lib/ensure/file.js | 43 + .../node_modules/fs-extra/lib/ensure/index.js | 21 + .../node_modules/fs-extra/lib/ensure/link.js | 58 + .../fs-extra/lib/ensure/symlink-paths.js | 97 + .../fs-extra/lib/ensure/symlink-type.js | 27 + .../fs-extra/lib/ensure/symlink.js | 62 + .../node_modules/fs-extra/lib/index.js | 38 + .../node_modules/fs-extra/lib/json/index.js | 9 + .../fs-extra/lib/json/jsonfile.js | 14 + .../fs-extra/lib/json/output-json-sync.js | 16 + .../fs-extra/lib/json/output-json.js | 24 + .../node_modules/fs-extra/lib/mkdirs/index.js | 9 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 49 + .../fs-extra/lib/mkdirs/mkdirs.js | 54 + .../node_modules/fs-extra/lib/move/index.js | 161 + .../node_modules/fs-extra/lib/output/index.js | 35 + .../node_modules/fs-extra/lib/remove/index.js | 14 + .../lib/streams/create-output-stream.js | 43 + .../fs-extra/lib/streams/index.js | 3 + .../node_modules/fs-extra/lib/util/assign.js | 14 + .../node_modules/fs-extra/lib/util/utimes.js | 69 + .../node_modules/fs-extra/lib/walk/index.js | 5 + .../node_modules/fs-extra/package.json | 94 + node_modules/mksnapshot/package.json | 66 + node_modules/ms/index.js | 152 + node_modules/ms/license.md | 21 + node_modules/ms/package.json | 79 + node_modules/ms/readme.md | 51 + node_modules/nodeify/.npmignore | 16 + node_modules/nodeify/.travis.yml | 3 + node_modules/nodeify/LICENSE | 19 + node_modules/nodeify/README.md | 88 + node_modules/nodeify/index.js | 54 + node_modules/nodeify/package.json | 64 + node_modules/nodeify/test/index.js | 141 + node_modules/nopt/.npmignore | 1 + node_modules/nopt/.travis.yml | 9 + node_modules/nopt/LICENSE | 15 + node_modules/nopt/README.md | 211 + node_modules/nopt/bin/nopt.js | 54 + node_modules/nopt/examples/my-program.js | 30 + node_modules/nopt/lib/nopt.js | 415 + node_modules/nopt/package.json | 61 + node_modules/nopt/test/basic.js | 273 + node_modules/normalize-package-data/AUTHORS | 4 + node_modules/normalize-package-data/LICENSE | 30 + node_modules/normalize-package-data/README.md | 106 + .../lib/extract_description.js | 14 + .../normalize-package-data/lib/fixer.js | 417 + .../lib/make_warning.js | 23 + .../normalize-package-data/lib/normalize.js | 39 + .../normalize-package-data/lib/safe_format.js | 9 + .../normalize-package-data/lib/typos.json | 25 + .../lib/warning_messages.json | 30 + .../normalize-package-data/package.json | 83 + node_modules/nugget/.npmignore | 2 + node_modules/nugget/.travis.yml | 3 + node_modules/nugget/bin.js | 32 + node_modules/nugget/collaborators.md | 9 + node_modules/nugget/index.js | 203 + node_modules/nugget/multiple.png | Bin 0 -> 29002 bytes .../nugget/node_modules/debug/.coveralls.yml | 1 + .../nugget/node_modules/debug/.eslintrc | 11 + .../nugget/node_modules/debug/.npmignore | 9 + .../nugget/node_modules/debug/.travis.yml | 14 + .../nugget/node_modules/debug/CHANGELOG.md | 362 + .../nugget/node_modules/debug/LICENSE | 19 + .../nugget/node_modules/debug/Makefile | 50 + .../nugget/node_modules/debug/README.md | 312 + .../nugget/node_modules/debug/component.json | 19 + .../nugget/node_modules/debug/karma.conf.js | 70 + .../nugget/node_modules/debug/node.js | 1 + .../nugget/node_modules/debug/package.json | 92 + .../nugget/node_modules/debug/src/browser.js | 185 + .../nugget/node_modules/debug/src/debug.js | 202 + .../nugget/node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../nugget/node_modules/debug/src/node.js | 248 + .../nugget/node_modules/minimist/.travis.yml | 8 + .../nugget/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../nugget/node_modules/minimist/index.js | 236 + .../nugget/node_modules/minimist/package.json | 77 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../nugget/node_modules/minimist/test/bool.js | 166 + .../nugget/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../nugget/node_modules/minimist/test/long.js | 31 + .../nugget/node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/nugget/package.json | 72 + node_modules/nugget/readme.md | 58 + node_modules/nugget/test/cli.js | 11 + node_modules/nugget/test/resume.html | 1 + node_modules/nugget/test/resume.js | 41 + node_modules/nugget/test/test.js | 38 + node_modules/nugget/usage.txt | 8 + node_modules/number-is-nan/index.js | 4 + node_modules/number-is-nan/license | 21 + node_modules/number-is-nan/package.json | 72 + node_modules/number-is-nan/readme.md | 28 + node_modules/oauth-sign/LICENSE | 55 + node_modules/oauth-sign/README.md | 4 + node_modules/oauth-sign/index.js | 136 + node_modules/oauth-sign/package.json | 60 + node_modules/object-assign/index.js | 90 + node_modules/object-assign/license | 21 + node_modules/object-assign/package.json | 78 + node_modules/object-assign/readme.md | 61 + node_modules/object-keys/.npmignore | 1 + node_modules/object-keys/.travis.yml | 5 + node_modules/object-keys/README.md | 39 + node_modules/object-keys/foreach.js | 40 + node_modules/object-keys/index.js | 2 + node_modules/object-keys/isArguments.js | 16 + node_modules/object-keys/package.json | 81 + node_modules/object-keys/shim.js | 62 + node_modules/object-keys/test/foreach.js | 156 + node_modules/object-keys/test/index.js | 6 + node_modules/object-keys/test/isArguments.js | 10 + node_modules/object-keys/test/shim.js | 134 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 79 + node_modules/once/once.js | 42 + node_modules/once/package.json | 72 + node_modules/os-tmpdir/index.js | 25 + node_modules/os-tmpdir/license | 21 + node_modules/os-tmpdir/package.json | 77 + node_modules/os-tmpdir/readme.md | 32 + node_modules/p-limit/index.js | 42 + node_modules/p-limit/license | 9 + node_modules/p-limit/package.json | 85 + node_modules/p-limit/readme.md | 69 + node_modules/p-locate/index.js | 31 + node_modules/p-locate/license | 21 + node_modules/p-locate/package.json | 90 + node_modules/p-locate/readme.md | 86 + node_modules/p-try/index.js | 4 + node_modules/p-try/license | 21 + node_modules/p-try/package.json | 79 + node_modules/p-try/readme.md | 38 + node_modules/parse-author/LICENSE | 21 + node_modules/parse-author/README.md | 115 + node_modules/parse-author/index.js | 43 + node_modules/parse-author/package.json | 125 + node_modules/parse-json/index.js | 35 + node_modules/parse-json/license | 21 + node_modules/parse-json/package.json | 83 + node_modules/parse-json/readme.md | 83 + node_modules/parse-json/vendor/parse.js | 752 ++ node_modules/parse-json/vendor/unicode.js | 71 + node_modules/path-exists/index.js | 17 + node_modules/path-exists/license | 21 + node_modules/path-exists/package.json | 77 + 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 | 81 + node_modules/path-is-absolute/readme.md | 59 + node_modules/path-parse/.travis.yml | 9 + node_modules/path-parse/README.md | 44 + node_modules/path-parse/index.js | 93 + node_modules/path-parse/index.min.js | 1 + node_modules/path-parse/package.json | 65 + node_modules/path-parse/test.js | 77 + node_modules/path-parse/test.min.js | 1 + node_modules/path-type/index.js | 29 + node_modules/path-type/license | 21 + .../path-type/node_modules/pify/index.js | 68 + .../path-type/node_modules/pify/license | 21 + .../path-type/node_modules/pify/package.json | 84 + .../path-type/node_modules/pify/readme.md | 119 + node_modules/path-type/package.json | 88 + node_modules/path-type/readme.md | 42 + node_modules/pend/LICENSE | 23 + node_modules/pend/README.md | 41 + node_modules/pend/index.js | 55 + node_modules/pend/package.json | 51 + node_modules/pend/test.js | 137 + node_modules/performance-now/.npmignore | 1 + node_modules/performance-now/.tm_properties | 7 + node_modules/performance-now/.travis.yml | 6 + node_modules/performance-now/README.md | 30 + .../performance-now/lib/performance-now.js | 36 + .../lib/performance-now.js.map | 10 + node_modules/performance-now/license.txt | 7 + node_modules/performance-now/package.json | 69 + node_modules/performance-now/src/index.d.ts | 8 + .../src/performance-now.coffee | 17 + node_modules/performance-now/test/mocha.opts | 3 + .../test/performance-now.coffee | 43 + .../performance-now/test/scripts.coffee | 27 + .../test/scripts/delayed-call.coffee | 11 + .../test/scripts/delayed-require.coffee | 12 + .../test/scripts/difference.coffee | 6 + .../test/scripts/initial-value.coffee | 10 + node_modules/pify/index.js | 84 + node_modules/pify/license | 9 + node_modules/pify/package.json | 87 + node_modules/pify/readme.md | 131 + node_modules/pinkie-promise/index.js | 3 + node_modules/pinkie-promise/license | 21 + node_modules/pinkie-promise/package.json | 74 + node_modules/pinkie-promise/readme.md | 28 + node_modules/pinkie/index.js | 292 + node_modules/pinkie/license | 21 + node_modules/pinkie/package.json | 72 + node_modules/pinkie/readme.md | 83 + node_modules/plist/.jshintrc | 4 + node_modules/plist/.travis.yml | 43 + node_modules/plist/History.md | 149 + node_modules/plist/LICENSE | 24 + node_modules/plist/Makefile | 76 + node_modules/plist/README.md | 141 + .../plist/examples/browser/index.html | 14 + node_modules/plist/index.js | 13 + node_modules/plist/lib/build.js | 137 + node_modules/plist/lib/parse.js | 215 + node_modules/plist/package.json | 90 + node_modules/pretty-bytes/cli.js | 32 + node_modules/pretty-bytes/license | 21 + node_modules/pretty-bytes/package.json | 85 + node_modules/pretty-bytes/pretty-bytes.js | 46 + node_modules/pretty-bytes/readme.md | 60 + node_modules/process-nextick-args/index.js | 44 + node_modules/process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 54 + node_modules/process-nextick-args/readme.md | 18 + node_modules/progress-stream/.npmignore | 2 + node_modules/progress-stream/LICENSE | 23 + node_modules/progress-stream/README.md | 163 + node_modules/progress-stream/index.js | 98 + node_modules/progress-stream/package.json | 72 + node_modules/progress-stream/test/http.js | 30 + node_modules/progress-stream/test/request.js | 20 + node_modules/promise/.npmignore | 6 + node_modules/promise/Readme.md | 66 + node_modules/promise/index.js | 98 + node_modules/promise/package.json | 56 + node_modules/punycode/LICENSE-MIT.txt | 20 + node_modules/punycode/README.md | 176 + node_modules/punycode/package.json | 91 + node_modules/punycode/punycode.js | 533 + node_modules/q/CHANGES.md | 800 ++ node_modules/q/LICENSE | 18 + node_modules/q/README.md | 874 ++ node_modules/q/package.json | 120 + node_modules/q/q.js | 2076 ++++ node_modules/q/queue.js | 35 + node_modules/qs/.editorconfig | 30 + node_modules/qs/.eslintignore | 1 + node_modules/qs/.eslintrc | 19 + node_modules/qs/CHANGELOG.md | 226 + node_modules/qs/LICENSE | 28 + node_modules/qs/README.md | 475 + node_modules/qs/lib/formats.js | 18 + node_modules/qs/lib/index.js | 11 + node_modules/qs/lib/parse.js | 174 + node_modules/qs/lib/stringify.js | 210 + node_modules/qs/lib/utils.js | 213 + node_modules/qs/package.json | 84 + node_modules/qs/test/.eslintrc | 15 + node_modules/qs/test/index.js | 7 + node_modules/qs/test/parse.js | 574 ++ node_modules/qs/test/stringify.js | 597 ++ node_modules/qs/test/utils.js | 34 + node_modules/rc/LICENSE.APACHE2 | 15 + node_modules/rc/LICENSE.BSD | 26 + node_modules/rc/LICENSE.MIT | 24 + node_modules/rc/README.md | 227 + node_modules/rc/browser.js | 7 + node_modules/rc/cli.js | 4 + node_modules/rc/index.js | 53 + node_modules/rc/lib/utils.js | 104 + .../rc/node_modules/minimist/.travis.yml | 8 + node_modules/rc/node_modules/minimist/LICENSE | 18 + .../rc/node_modules/minimist/example/parse.js | 2 + .../rc/node_modules/minimist/index.js | 236 + .../rc/node_modules/minimist/package.json | 77 + .../rc/node_modules/minimist/readme.markdown | 91 + .../rc/node_modules/minimist/test/all_bool.js | 32 + .../rc/node_modules/minimist/test/bool.js | 166 + .../rc/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../rc/node_modules/minimist/test/dotted.js | 22 + .../rc/node_modules/minimist/test/kv_short.js | 16 + .../rc/node_modules/minimist/test/long.js | 31 + .../rc/node_modules/minimist/test/num.js | 36 + .../rc/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../rc/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../rc/node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/rc/package.json | 68 + node_modules/rc/test/ini.js | 16 + node_modules/rc/test/nested-env-vars.js | 50 + node_modules/rc/test/test.js | 59 + node_modules/rcedit/LICENSE | 20 + node_modules/rcedit/README.md | 42 + node_modules/rcedit/bin/rcedit.exe | Bin 0 -> 955904 bytes node_modules/rcedit/lib/rcedit.js | 71 + node_modules/rcedit/package.json | 55 + node_modules/read-pkg-up/index.js | 31 + node_modules/read-pkg-up/license | 21 + node_modules/read-pkg-up/package.json | 95 + node_modules/read-pkg-up/readme.md | 79 + node_modules/read-pkg/index.js | 48 + node_modules/read-pkg/license | 21 + node_modules/read-pkg/package.json | 78 + node_modules/read-pkg/readme.md | 79 + node_modules/readable-stream/.npmignore | 5 + node_modules/readable-stream/LICENSE | 18 + node_modules/readable-stream/README.md | 15 + node_modules/readable-stream/duplex.js | 1 + node_modules/readable-stream/float.patch | 923 ++ .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 ++ .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + node_modules/readable-stream/package.json | 70 + node_modules/readable-stream/passthrough.js | 1 + node_modules/readable-stream/readable.js | 10 + node_modules/readable-stream/transform.js | 1 + node_modules/readable-stream/writable.js | 1 + node_modules/redent/index.js | 7 + node_modules/redent/license | 21 + node_modules/redent/package.json | 79 + node_modules/redent/readme.md | 48 + node_modules/repeating/index.js | 24 + node_modules/repeating/license | 21 + node_modules/repeating/package.json | 73 + node_modules/repeating/readme.md | 30 + node_modules/request/CHANGELOG.md | 706 ++ node_modules/request/LICENSE | 55 + node_modules/request/README.md | 1097 ++ node_modules/request/index.js | 155 + node_modules/request/lib/auth.js | 167 + node_modules/request/lib/cookies.js | 38 + node_modules/request/lib/getProxyFromURI.js | 79 + node_modules/request/lib/har.js | 205 + node_modules/request/lib/helpers.js | 66 + node_modules/request/lib/multipart.js | 112 + node_modules/request/lib/oauth.js | 148 + node_modules/request/lib/querystring.js | 50 + node_modules/request/lib/redirect.js | 154 + node_modules/request/lib/tunnel.js | 175 + node_modules/request/package.json | 121 + node_modules/request/request.js | 1546 +++ node_modules/resolve/.editorconfig | 20 + node_modules/resolve/.eslintignore | 1 + node_modules/resolve/.eslintrc | 30 + node_modules/resolve/.travis.yml | 200 + node_modules/resolve/LICENSE | 18 + node_modules/resolve/appveyor.yml | 47 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 8 + node_modules/resolve/lib/async.js | 205 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 53 + node_modules/resolve/lib/core.json | 69 + .../resolve/lib/node-modules-paths.js | 45 + node_modules/resolve/lib/sync.js | 131 + node_modules/resolve/package.json | 73 + node_modules/resolve/readme.markdown | 173 + node_modules/resolve/test/.eslintrc | 5 + node_modules/resolve/test/core.js | 82 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 13 + node_modules/resolve/test/filter.js | 34 + node_modules/resolve/test/filter_sync.js | 26 + node_modules/resolve/test/mock.js | 143 + node_modules/resolve/test/mock_sync.js | 67 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../resolve/test/node-modules-paths.js | 93 + node_modules/resolve/test/node_path.js | 49 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 75 + .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 387 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + .../resolve/test/resolver/browser_field/a.js | 0 .../resolve/test/resolver/browser_field/b.js | 0 .../test/resolver/browser_field/package.json | 5 + node_modules/resolve/test/resolver/cup.coffee | 1 + .../resolve/test/resolver/dot_main/index.js | 1 + .../test/resolver/dot_main/package.json | 3 + .../test/resolver/dot_slash_main/index.js | 1 + .../test/resolver/dot_slash_main/package.json | 3 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../resolve/test/resolver/same_names/foo.js | 1 + .../test/resolver/same_names/foo/index.js | 1 + .../resolver/symlinked/_/node_modules/foo.js | 0 .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 295 + node_modules/resolve/test/subdirs.js | 13 + node_modules/resolve/test/symlinks.js | 54 + node_modules/rimraf/LICENSE | 15 + node_modules/rimraf/README.md | 101 + node_modules/rimraf/bin.js | 50 + node_modules/rimraf/node_modules/glob/LICENSE | 15 + .../rimraf/node_modules/glob/README.md | 368 + .../rimraf/node_modules/glob/changelog.md | 67 + .../rimraf/node_modules/glob/common.js | 240 + node_modules/rimraf/node_modules/glob/glob.js | 790 ++ .../rimraf/node_modules/glob/package.json | 80 + node_modules/rimraf/node_modules/glob/sync.js | 486 + node_modules/rimraf/package.json | 75 + node_modules/rimraf/rimraf.js | 364 + node_modules/safe-buffer/LICENSE | 21 + node_modules/safe-buffer/README.md | 584 ++ node_modules/safe-buffer/index.d.ts | 187 + node_modules/safe-buffer/index.js | 62 + node_modules/safe-buffer/package.json | 69 + node_modules/sanitize-filename/.gitmodules | 3 + node_modules/sanitize-filename/.npmignore | 1 + node_modules/sanitize-filename/.travis.yml | 49 + node_modules/sanitize-filename/.zuul.yml | 14 + node_modules/sanitize-filename/AUTHORS | 2 + node_modules/sanitize-filename/Changelog.md | 6 + node_modules/sanitize-filename/LICENSE.md | 34 + node_modules/sanitize-filename/README.md | 100 + node_modules/sanitize-filename/index.js | 56 + node_modules/sanitize-filename/package.json | 80 + node_modules/sanitize-filename/test.js | 272 + 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/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/single-line-log/.npmignore | 1 + node_modules/single-line-log/LICENSE | 21 + node_modules/single-line-log/README.md | 56 + node_modules/single-line-log/index.js | 51 + node_modules/single-line-log/package.json | 66 + node_modules/single-line-log/test.js | 21 + node_modules/sntp/.npmignore | 3 + node_modules/sntp/LICENSE | 28 + node_modules/sntp/README.md | 68 + node_modules/sntp/lib/index.js | 412 + node_modules/sntp/package.json | 68 + node_modules/spdx-correct/LICENSE | 202 + node_modules/spdx-correct/README.md | 10 + node_modules/spdx-correct/index.js | 326 + node_modules/spdx-correct/package.json | 84 + node_modules/spdx-exceptions/README.md | 36 + node_modules/spdx-exceptions/index.json | 29 + node_modules/spdx-exceptions/package.json | 53 + node_modules/spdx-expression-parse/AUTHORS | 4 + node_modules/spdx-expression-parse/LICENSE | 22 + node_modules/spdx-expression-parse/README.md | 91 + node_modules/spdx-expression-parse/index.js | 8 + .../spdx-expression-parse/package.json | 101 + node_modules/spdx-expression-parse/parse.js | 138 + node_modules/spdx-expression-parse/scan.js | 131 + node_modules/spdx-license-ids/README.md | 52 + node_modules/spdx-license-ids/deprecated.json | 23 + node_modules/spdx-license-ids/index.json | 344 + node_modules/spdx-license-ids/package.json | 82 + node_modules/speedometer/LICENSE | 20 + node_modules/speedometer/README.md | 38 + node_modules/speedometer/index.js | 35 + node_modules/speedometer/package.json | 53 + node_modules/sshpk/.npmignore | 9 + node_modules/sshpk/.travis.yml | 11 + node_modules/sshpk/LICENSE | 18 + node_modules/sshpk/README.md | 698 ++ node_modules/sshpk/bin/sshpk-conv | 202 + node_modules/sshpk/bin/sshpk-sign | 191 + node_modules/sshpk/bin/sshpk-verify | 166 + node_modules/sshpk/lib/algs.js | 166 + node_modules/sshpk/lib/certificate.js | 377 + node_modules/sshpk/lib/dhe.js | 413 + node_modules/sshpk/lib/ed-compat.js | 97 + node_modules/sshpk/lib/errors.js | 84 + node_modules/sshpk/lib/fingerprint.js | 161 + node_modules/sshpk/lib/formats/auto.js | 106 + node_modules/sshpk/lib/formats/dnssec.js | 286 + .../sshpk/lib/formats/openssh-cert.js | 322 + node_modules/sshpk/lib/formats/pem.js | 191 + node_modules/sshpk/lib/formats/pkcs1.js | 376 + node_modules/sshpk/lib/formats/pkcs8.js | 616 ++ node_modules/sshpk/lib/formats/rfc4253.js | 165 + node_modules/sshpk/lib/formats/ssh-private.js | 261 + node_modules/sshpk/lib/formats/ssh.js | 114 + node_modules/sshpk/lib/formats/x509-pem.js | 77 + node_modules/sshpk/lib/formats/x509.js | 729 ++ node_modules/sshpk/lib/identity.js | 288 + node_modules/sshpk/lib/index.js | 39 + node_modules/sshpk/lib/key.js | 275 + node_modules/sshpk/lib/private-key.js | 252 + node_modules/sshpk/lib/signature.js | 313 + node_modules/sshpk/lib/ssh-buffer.js | 148 + node_modules/sshpk/lib/utils.js | 388 + node_modules/sshpk/man/man1/sshpk-conv.1 | 135 + node_modules/sshpk/man/man1/sshpk-sign.1 | 81 + node_modules/sshpk/man/man1/sshpk-verify.1 | 68 + node_modules/sshpk/package.json | 104 + 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/string_decoder/.npmignore | 2 + node_modules/string_decoder/LICENSE | 20 + node_modules/string_decoder/README.md | 7 + node_modules/string_decoder/index.js | 221 + node_modules/string_decoder/package.json | 57 + node_modules/strip-ansi/index.js | 6 + node_modules/strip-ansi/license | 21 + node_modules/strip-ansi/package.json | 105 + node_modules/strip-ansi/readme.md | 33 + node_modules/strip-bom/index.js | 17 + node_modules/strip-bom/license | 21 + node_modules/strip-bom/package.json | 78 + node_modules/strip-bom/readme.md | 39 + node_modules/strip-indent/cli.js | 49 + node_modules/strip-indent/index.js | 16 + node_modules/strip-indent/license | 21 + node_modules/strip-indent/package.json | 82 + node_modules/strip-indent/readme.md | 61 + 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/sumchecker/LICENSE | 202 + node_modules/sumchecker/NEWS.md | 59 + node_modules/sumchecker/README.md | 80 + node_modules/sumchecker/build.js | 232 + node_modules/sumchecker/index.js | 176 + .../node_modules/debug/.coveralls.yml | 1 + .../sumchecker/node_modules/debug/.eslintrc | 11 + .../sumchecker/node_modules/debug/.npmignore | 9 + .../sumchecker/node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../sumchecker/node_modules/debug/LICENSE | 19 + .../sumchecker/node_modules/debug/Makefile | 50 + .../sumchecker/node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../sumchecker/node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 92 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../sumchecker/node_modules/debug/src/node.js | 248 + node_modules/sumchecker/package.json | 86 + node_modules/throttleit/.npmignore | 2 + node_modules/throttleit/History.md | 11 + node_modules/throttleit/Makefile | 11 + node_modules/throttleit/Readme.md | 16 + node_modules/throttleit/component.json | 13 + node_modules/throttleit/example.js | 14 + node_modules/throttleit/index.js | 30 + node_modules/throttleit/package.json | 51 + node_modules/through2/.jshintrc | 59 + node_modules/through2/.npmignore | 1 + node_modules/through2/.travis.yml | 12 + node_modules/through2/LICENSE | 39 + node_modules/through2/README.md | 107 + node_modules/through2/package.json | 67 + node_modules/through2/test.js | 314 + node_modules/through2/through2.js | 42 + node_modules/tmp/.npmignore | 2 + node_modules/tmp/.travis.yml | 8 + node_modules/tmp/Gruntfile.js | 18 + node_modules/tmp/LICENSE | 21 + node_modules/tmp/README.md | 266 + node_modules/tmp/cleanup.sh | 3 + node_modules/tmp/lib/tmp.js | 462 + node_modules/tmp/package.json | 70 + node_modules/tmp/test/base.js | 149 + node_modules/tmp/test/dir-sync-test.js | 230 + node_modules/tmp/test/dir-test.js | 225 + node_modules/tmp/test/file-sync-test.js | 190 + node_modules/tmp/test/file-test.js | 191 + node_modules/tmp/test/graceful-sync.js | 20 + node_modules/tmp/test/graceful.js | 15 + node_modules/tmp/test/issue62-sync.js | 27 + node_modules/tmp/test/issue62.js | 27 + node_modules/tmp/test/keep-sync.js | 12 + node_modules/tmp/test/keep.js | 11 + node_modules/tmp/test/name-test.js | 82 + node_modules/tmp/test/spawn-sync.js | 32 + node_modules/tmp/test/spawn.js | 32 + node_modules/tmp/test/symlinkme/file.js | 0 node_modules/tmp/test/unsafe-sync.js | 30 + node_modules/tmp/test/unsafe.js | 30 + node_modules/touch/LICENSE | 15 + node_modules/touch/README.md | 39 + node_modules/touch/bin/touch.js | 31 + node_modules/touch/node_modules/.bin/nopt | 1 + .../touch/node_modules/nopt/.npmignore | 0 node_modules/touch/node_modules/nopt/LICENSE | 23 + .../touch/node_modules/nopt/README.md | 208 + .../touch/node_modules/nopt/bin/nopt.js | 44 + .../node_modules/nopt/examples/my-program.js | 30 + .../touch/node_modules/nopt/lib/nopt.js | 552 + .../touch/node_modules/nopt/package.json | 61 + node_modules/touch/package.json | 57 + node_modules/touch/test/sanity.js | 31 + node_modules/touch/touch.js | 154 + node_modules/tough-cookie/LICENSE | 27 + node_modules/tough-cookie/README.md | 509 + node_modules/tough-cookie/lib/cookie.js | 1426 +++ node_modules/tough-cookie/lib/memstore.js | 170 + node_modules/tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 56 + node_modules/tough-cookie/lib/pubsuffix.js | 98 + node_modules/tough-cookie/lib/store.js | 71 + node_modules/tough-cookie/package.json | 96 + node_modules/traverse/.npmignore | 1 + node_modules/traverse/LICENSE | 24 + node_modules/traverse/README.markdown | 247 + node_modules/traverse/examples/json.js | 16 + node_modules/traverse/examples/leaves.js | 15 + node_modules/traverse/examples/negative.js | 8 + node_modules/traverse/examples/stringify.js | 38 + node_modules/traverse/index.js | 322 + node_modules/traverse/package.json | 53 + node_modules/traverse/test/circular.js | 114 + node_modules/traverse/test/date.js | 35 + node_modules/traverse/test/equal.js | 219 + node_modules/traverse/test/instance.js | 17 + node_modules/traverse/test/interface.js | 42 + node_modules/traverse/test/json.js | 47 + node_modules/traverse/test/leaves.js | 21 + node_modules/traverse/test/mutability.js | 203 + node_modules/traverse/test/negative.js | 20 + node_modules/traverse/test/obj.js | 15 + node_modules/traverse/test/stop.js | 41 + node_modules/traverse/test/stringify.js | 36 + node_modules/traverse/test/super_deep.js | 54 + node_modules/trim-newlines/index.js | 13 + node_modules/trim-newlines/license | 21 + node_modules/trim-newlines/package.json | 78 + node_modules/trim-newlines/readme.md | 46 + node_modules/truncate-utf8-bytes/.gitmodules | 3 + node_modules/truncate-utf8-bytes/.npmignore | 1 + node_modules/truncate-utf8-bytes/.travis.yml | 12 + node_modules/truncate-utf8-bytes/AUTHORS | 2 + node_modules/truncate-utf8-bytes/README.md | 27 + node_modules/truncate-utf8-bytes/browser.js | 5 + node_modules/truncate-utf8-bytes/index.js | 5 + .../truncate-utf8-bytes/lib/truncate.js | 43 + node_modules/truncate-utf8-bytes/package.json | 72 + node_modules/truncate-utf8-bytes/test.js | 75 + node_modules/tunnel-agent/LICENSE | 55 + node_modules/tunnel-agent/README.md | 4 + node_modules/tunnel-agent/index.js | 244 + node_modules/tunnel-agent/package.json | 59 + node_modules/tweetnacl/.npmignore | 4 + node_modules/tweetnacl/AUTHORS.md | 28 + node_modules/tweetnacl/CHANGELOG.md | 221 + node_modules/tweetnacl/LICENSE | 24 + .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 + node_modules/tweetnacl/README.md | 459 + node_modules/tweetnacl/nacl-fast.js | 2388 +++++ node_modules/tweetnacl/nacl-fast.min.js | 2 + node_modules/tweetnacl/nacl.d.ts | 98 + node_modules/tweetnacl/nacl.js | 1175 +++ node_modules/tweetnacl/nacl.min.js | 1 + node_modules/tweetnacl/package.json | 91 + node_modules/typedarray/.travis.yml | 4 + node_modules/typedarray/LICENSE | 35 + node_modules/typedarray/example/tarray.js | 4 + node_modules/typedarray/index.js | 630 ++ node_modules/typedarray/package.json | 87 + node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + node_modules/typedarray/test/tarray.js | 10 + node_modules/universalify/LICENSE | 20 + node_modules/universalify/README.md | 73 + node_modules/universalify/index.js | 25 + node_modules/universalify/package.json | 66 + node_modules/utf8-byte-length/.gitmodules | 3 + node_modules/utf8-byte-length/.npmignore | 1 + node_modules/utf8-byte-length/.travis.yml | 12 + node_modules/utf8-byte-length/AUTHORS | 2 + node_modules/utf8-byte-length/README.md | 28 + node_modules/utf8-byte-length/browser.js | 47 + node_modules/utf8-byte-length/index.js | 8 + node_modules/utf8-byte-length/package.json | 68 + node_modules/utf8-byte-length/test.js | 67 + node_modules/util-deprecate/History.md | 16 + node_modules/util-deprecate/LICENSE | 24 + node_modules/util-deprecate/README.md | 53 + node_modules/util-deprecate/browser.js | 67 + node_modules/util-deprecate/node.js | 6 + node_modules/util-deprecate/package.json | 60 + node_modules/uuid/.eslintrc.json | 47 + node_modules/uuid/AUTHORS | 5 + node_modules/uuid/CHANGELOG.md | 57 + node_modules/uuid/LICENSE.md | 21 + node_modules/uuid/README.md | 293 + node_modules/uuid/README_js.md | 280 + node_modules/uuid/bin/uuid | 65 + node_modules/uuid/index.js | 8 + node_modules/uuid/lib/bytesToUuid.js | 23 + node_modules/uuid/lib/md5-browser.js | 216 + node_modules/uuid/lib/md5.js | 25 + node_modules/uuid/lib/rng-browser.js | 32 + node_modules/uuid/lib/rng.js | 8 + node_modules/uuid/lib/sha1-browser.js | 89 + node_modules/uuid/lib/sha1.js | 25 + node_modules/uuid/lib/v35.js | 53 + node_modules/uuid/package.json | 91 + node_modules/uuid/v1.js | 109 + node_modules/uuid/v3.js | 4 + node_modules/uuid/v4.js | 29 + node_modules/uuid/v5.js | 3 + .../validate-npm-package-license/LICENSE | 202 + .../validate-npm-package-license/README.md | 113 + .../validate-npm-package-license/index.js | 84 + .../validate-npm-package-license/package.json | 65 + .../validate-npm-package-license/test.log | 4 + node_modules/verror/.npmignore | 9 + node_modules/verror/CHANGES.md | 28 + node_modules/verror/CONTRIBUTING.md | 19 + node_modules/verror/LICENSE | 19 + node_modules/verror/README.md | 528 + node_modules/verror/lib/verror.js | 451 + node_modules/verror/package.json | 55 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 63 + node_modules/wrappy/wrappy.js | 33 + node_modules/xmlbuilder/.npmignore | 5 + node_modules/xmlbuilder/CHANGELOG.md | 395 + node_modules/xmlbuilder/LICENSE | 21 + node_modules/xmlbuilder/README.md | 85 + node_modules/xmlbuilder/lib/Utility.js | 139 + node_modules/xmlbuilder/lib/XMLAttribute.js | 31 + node_modules/xmlbuilder/lib/XMLCData.js | 32 + node_modules/xmlbuilder/lib/XMLComment.js | 32 + node_modules/xmlbuilder/lib/XMLDTDAttList.js | 50 + node_modules/xmlbuilder/lib/XMLDTDElement.js | 35 + node_modules/xmlbuilder/lib/XMLDTDEntity.js | 56 + node_modules/xmlbuilder/lib/XMLDTDNotation.js | 37 + node_modules/xmlbuilder/lib/XMLDeclaration.js | 40 + node_modules/xmlbuilder/lib/XMLDocType.js | 107 + node_modules/xmlbuilder/lib/XMLDocument.js | 48 + node_modules/xmlbuilder/lib/XMLDocumentCB.js | 402 + node_modules/xmlbuilder/lib/XMLElement.js | 111 + node_modules/xmlbuilder/lib/XMLNode.js | 432 + .../lib/XMLProcessingInstruction.js | 35 + node_modules/xmlbuilder/lib/XMLRaw.js | 32 + .../xmlbuilder/lib/XMLStreamWriter.js | 278 + .../xmlbuilder/lib/XMLStringWriter.js | 302 + node_modules/xmlbuilder/lib/XMLStringifier.js | 192 + node_modules/xmlbuilder/lib/XMLText.js | 32 + node_modules/xmlbuilder/lib/XMLWriterBase.js | 68 + node_modules/xmlbuilder/lib/index.js | 53 + node_modules/xmlbuilder/package.json | 69 + node_modules/xmldom/.npmignore | 5 + node_modules/xmldom/.travis.yml | 22 + node_modules/xmldom/LICENSE | 8 + node_modules/xmldom/__package__.js | 4 + node_modules/xmldom/changelog | 14 + node_modules/xmldom/component.json | 10 + node_modules/xmldom/dom-parser.js | 251 + node_modules/xmldom/dom.js | 1244 +++ node_modules/xmldom/package.json | 99 + node_modules/xmldom/readme.md | 219 + node_modules/xmldom/sax.js | 633 ++ node_modules/xtend/.npmignore | 1 + node_modules/xtend/LICENCE | 19 + node_modules/xtend/Makefile | 4 + node_modules/xtend/README.md | 27 + node_modules/xtend/has-keys.js | 7 + node_modules/xtend/index.js | 25 + node_modules/xtend/mutable.js | 25 + node_modules/xtend/package.json | 97 + node_modules/xtend/test.js | 63 + node_modules/yargs-parser/CHANGELOG.md | 343 + node_modules/yargs-parser/LICENSE.txt | 14 + node_modules/yargs-parser/README.md | 308 + node_modules/yargs-parser/index.js | 813 ++ .../yargs-parser/lib/tokenize-arg-string.js | 40 + .../node_modules/camelcase/index.js | 64 + .../node_modules/camelcase/license | 21 + .../node_modules/camelcase/package.json | 78 + .../node_modules/camelcase/readme.md | 57 + node_modules/yargs-parser/package.json | 79 + node_modules/yauzl/.npmignore | 2 + node_modules/yauzl/.travis.yml | 8 + node_modules/yauzl/LICENSE | 21 + node_modules/yauzl/README.md | 467 + node_modules/yauzl/index.js | 626 ++ node_modules/yauzl/package.json | 68 + 4115 files changed, 440218 insertions(+), 7519 deletions(-) mode change 100644 => 120000 app/node_modules/.bin/asar delete mode 100644 app/node_modules/.bin/asar.cmd mode change 100644 => 120000 app/node_modules/.bin/decompress-zip delete mode 100644 app/node_modules/.bin/decompress-zip.cmd create mode 120000 app/node_modules/.bin/electron create mode 120000 app/node_modules/.bin/electron-download mode change 100644 => 120000 app/node_modules/.bin/electron-osx-flat delete mode 100644 app/node_modules/.bin/electron-osx-flat.cmd mode change 100644 => 120000 app/node_modules/.bin/electron-osx-sign delete mode 100644 app/node_modules/.bin/electron-osx-sign.cmd mode change 100644 => 120000 app/node_modules/.bin/electron-packager delete mode 100644 app/node_modules/.bin/electron-packager.cmd create mode 120000 app/node_modules/.bin/extract-zip create mode 120000 app/node_modules/.bin/mkdirp mode change 100644 => 120000 app/node_modules/.bin/nopt delete mode 100644 app/node_modules/.bin/nopt.cmd create mode 120000 app/node_modules/.bin/nugget create mode 120000 app/node_modules/.bin/pretty-bytes create mode 120000 app/node_modules/.bin/rc create mode 120000 app/node_modules/.bin/rimraf create mode 120000 app/node_modules/.bin/semver create mode 120000 app/node_modules/.bin/sshpk-conv create mode 120000 app/node_modules/.bin/sshpk-sign create mode 120000 app/node_modules/.bin/sshpk-verify create mode 120000 app/node_modules/.bin/strip-indent create mode 120000 app/node_modules/.bin/uuid create mode 100644 app/node_modules/@types/node/LICENSE create mode 100644 app/node_modules/@types/node/README.md create mode 100644 app/node_modules/@types/node/index.d.ts create mode 100644 app/node_modules/@types/node/inspector.d.ts create mode 100644 app/node_modules/@types/node/package.json create mode 100644 app/node_modules/ajv/.tonic_example.js create mode 100644 app/node_modules/ajv/LICENSE create mode 100644 app/node_modules/ajv/README.md create mode 100644 app/node_modules/ajv/lib/$data.js create mode 100644 app/node_modules/ajv/lib/ajv.d.ts create mode 100644 app/node_modules/ajv/lib/ajv.js create mode 100644 app/node_modules/ajv/lib/cache.js create mode 100644 app/node_modules/ajv/lib/compile/_rules.js create mode 100644 app/node_modules/ajv/lib/compile/async.js create mode 100644 app/node_modules/ajv/lib/compile/equal.js create mode 100644 app/node_modules/ajv/lib/compile/error_classes.js create mode 100644 app/node_modules/ajv/lib/compile/formats.js create mode 100644 app/node_modules/ajv/lib/compile/index.js create mode 100644 app/node_modules/ajv/lib/compile/resolve.js create mode 100644 app/node_modules/ajv/lib/compile/rules.js create mode 100644 app/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 app/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 app/node_modules/ajv/lib/compile/util.js create mode 100644 app/node_modules/ajv/lib/dot/_limit.jst create mode 100644 app/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 app/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 app/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 app/node_modules/ajv/lib/dot/allOf.jst create mode 100644 app/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 app/node_modules/ajv/lib/dot/coerce.def create mode 100644 app/node_modules/ajv/lib/dot/const.jst create mode 100644 app/node_modules/ajv/lib/dot/contains.jst create mode 100644 app/node_modules/ajv/lib/dot/custom.jst create mode 100644 app/node_modules/ajv/lib/dot/defaults.def create mode 100644 app/node_modules/ajv/lib/dot/definitions.def create mode 100644 app/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 app/node_modules/ajv/lib/dot/enum.jst create mode 100644 app/node_modules/ajv/lib/dot/errors.def create mode 100644 app/node_modules/ajv/lib/dot/format.jst create mode 100644 app/node_modules/ajv/lib/dot/items.jst create mode 100644 app/node_modules/ajv/lib/dot/missing.def create mode 100644 app/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 app/node_modules/ajv/lib/dot/not.jst create mode 100644 app/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 app/node_modules/ajv/lib/dot/pattern.jst create mode 100644 app/node_modules/ajv/lib/dot/properties.jst create mode 100644 app/node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 app/node_modules/ajv/lib/dot/ref.jst create mode 100644 app/node_modules/ajv/lib/dot/required.jst create mode 100644 app/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 app/node_modules/ajv/lib/dot/validate.jst create mode 100644 app/node_modules/ajv/lib/dotjs/README.md create mode 100644 app/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 app/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 app/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 app/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 app/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 app/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 app/node_modules/ajv/lib/dotjs/const.js create mode 100644 app/node_modules/ajv/lib/dotjs/contains.js create mode 100644 app/node_modules/ajv/lib/dotjs/custom.js create mode 100644 app/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 app/node_modules/ajv/lib/dotjs/enum.js create mode 100644 app/node_modules/ajv/lib/dotjs/format.js create mode 100644 app/node_modules/ajv/lib/dotjs/items.js create mode 100644 app/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 app/node_modules/ajv/lib/dotjs/not.js create mode 100644 app/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 app/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 app/node_modules/ajv/lib/dotjs/properties.js create mode 100644 app/node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 app/node_modules/ajv/lib/dotjs/ref.js create mode 100644 app/node_modules/ajv/lib/dotjs/required.js create mode 100644 app/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 app/node_modules/ajv/lib/dotjs/validate.js create mode 100644 app/node_modules/ajv/lib/keyword.js create mode 100644 app/node_modules/ajv/lib/patternGroups.js create mode 100644 app/node_modules/ajv/lib/refs/$data.json create mode 100644 app/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 app/node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 app/node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 app/node_modules/ajv/package.json create mode 100644 app/node_modules/ajv/scripts/.eslintrc.yml create mode 100644 app/node_modules/ajv/scripts/bundle.js create mode 100644 app/node_modules/ajv/scripts/compile-dots.js create mode 100755 app/node_modules/ajv/scripts/info create mode 100755 app/node_modules/ajv/scripts/prepare-tests create mode 100755 app/node_modules/ajv/scripts/travis-gh-pages create mode 100644 app/node_modules/ansi-regex/index.js create mode 100644 app/node_modules/ansi-regex/license create mode 100644 app/node_modules/ansi-regex/package.json create mode 100644 app/node_modules/ansi-regex/readme.md create mode 100644 app/node_modules/array-find-index/index.js create mode 100644 app/node_modules/array-find-index/license create mode 100644 app/node_modules/array-find-index/package.json create mode 100644 app/node_modules/array-find-index/readme.md mode change 100644 => 100755 app/node_modules/asar/bin/asar.js create mode 100644 app/node_modules/asn1/.npmignore create mode 100644 app/node_modules/asn1/.travis.yml create mode 100644 app/node_modules/asn1/LICENSE create mode 100644 app/node_modules/asn1/README.md create mode 100644 app/node_modules/asn1/lib/ber/errors.js create mode 100644 app/node_modules/asn1/lib/ber/index.js create mode 100644 app/node_modules/asn1/lib/ber/reader.js create mode 100644 app/node_modules/asn1/lib/ber/types.js create mode 100644 app/node_modules/asn1/lib/ber/writer.js create mode 100644 app/node_modules/asn1/lib/index.js create mode 100644 app/node_modules/asn1/package.json create mode 100644 app/node_modules/asn1/tst/ber/reader.test.js create mode 100644 app/node_modules/asn1/tst/ber/writer.test.js create mode 100644 app/node_modules/assert-plus/AUTHORS create mode 100644 app/node_modules/assert-plus/CHANGES.md create mode 100644 app/node_modules/assert-plus/README.md create mode 100644 app/node_modules/assert-plus/assert.js create mode 100644 app/node_modules/assert-plus/package.json create mode 100644 app/node_modules/asynckit/LICENSE create mode 100644 app/node_modules/asynckit/README.md create mode 100644 app/node_modules/asynckit/bench.js create mode 100644 app/node_modules/asynckit/index.js create mode 100644 app/node_modules/asynckit/lib/abort.js create mode 100644 app/node_modules/asynckit/lib/async.js create mode 100644 app/node_modules/asynckit/lib/defer.js create mode 100644 app/node_modules/asynckit/lib/iterate.js create mode 100644 app/node_modules/asynckit/lib/readable_asynckit.js create mode 100644 app/node_modules/asynckit/lib/readable_parallel.js create mode 100644 app/node_modules/asynckit/lib/readable_serial.js create mode 100644 app/node_modules/asynckit/lib/readable_serial_ordered.js create mode 100644 app/node_modules/asynckit/lib/state.js create mode 100644 app/node_modules/asynckit/lib/streamify.js create mode 100644 app/node_modules/asynckit/lib/terminator.js create mode 100644 app/node_modules/asynckit/package.json create mode 100644 app/node_modules/asynckit/parallel.js create mode 100644 app/node_modules/asynckit/serial.js create mode 100644 app/node_modules/asynckit/serialOrdered.js create mode 100644 app/node_modules/asynckit/stream.js create mode 100644 app/node_modules/aws-sign2/LICENSE create mode 100644 app/node_modules/aws-sign2/README.md create mode 100644 app/node_modules/aws-sign2/index.js create mode 100644 app/node_modules/aws-sign2/package.json create mode 100644 app/node_modules/aws4/.travis.yml create mode 100644 app/node_modules/aws4/LICENSE create mode 100644 app/node_modules/aws4/README.md create mode 100644 app/node_modules/aws4/aws4.js create mode 100644 app/node_modules/aws4/lru.js create mode 100644 app/node_modules/aws4/package.json create mode 100644 app/node_modules/balanced-match/.npmignore create mode 100644 app/node_modules/balanced-match/LICENSE.md create mode 100644 app/node_modules/balanced-match/README.md create mode 100644 app/node_modules/balanced-match/index.js create mode 100644 app/node_modules/balanced-match/package.json create mode 100644 app/node_modules/bcrypt-pbkdf/README.md create mode 100644 app/node_modules/bcrypt-pbkdf/index.js create mode 100644 app/node_modules/bcrypt-pbkdf/package.json create mode 100755 app/node_modules/boom/LICENSE create mode 100755 app/node_modules/boom/README.md create mode 100755 app/node_modules/boom/lib/index.js create mode 100644 app/node_modules/boom/package.json create mode 100644 app/node_modules/bootstrap/LICENSE create mode 100644 app/node_modules/bootstrap/README.md create mode 100644 app/node_modules/bootstrap/js/src/alert.js create mode 100644 app/node_modules/bootstrap/js/src/button.js create mode 100644 app/node_modules/bootstrap/js/src/carousel.js create mode 100644 app/node_modules/bootstrap/js/src/collapse.js create mode 100644 app/node_modules/bootstrap/js/src/dropdown.js create mode 100644 app/node_modules/bootstrap/js/src/index.js create mode 100644 app/node_modules/bootstrap/js/src/modal.js create mode 100644 app/node_modules/bootstrap/js/src/popover.js create mode 100644 app/node_modules/bootstrap/js/src/scrollspy.js create mode 100644 app/node_modules/bootstrap/js/src/tab.js create mode 100644 app/node_modules/bootstrap/js/src/tooltip.js create mode 100644 app/node_modules/bootstrap/js/src/util.js create mode 100644 app/node_modules/bootstrap/package.json create mode 100644 app/node_modules/bootstrap/scss/_alert.scss create mode 100644 app/node_modules/bootstrap/scss/_badge.scss create mode 100644 app/node_modules/bootstrap/scss/_breadcrumb.scss create mode 100644 app/node_modules/bootstrap/scss/_button-group.scss create mode 100644 app/node_modules/bootstrap/scss/_buttons.scss create mode 100644 app/node_modules/bootstrap/scss/_card.scss create mode 100644 app/node_modules/bootstrap/scss/_carousel.scss create mode 100644 app/node_modules/bootstrap/scss/_close.scss create mode 100644 app/node_modules/bootstrap/scss/_code.scss create mode 100644 app/node_modules/bootstrap/scss/_custom-forms.scss create mode 100644 app/node_modules/bootstrap/scss/_dropdown.scss create mode 100644 app/node_modules/bootstrap/scss/_forms.scss create mode 100644 app/node_modules/bootstrap/scss/_functions.scss create mode 100644 app/node_modules/bootstrap/scss/_grid.scss create mode 100644 app/node_modules/bootstrap/scss/_images.scss create mode 100644 app/node_modules/bootstrap/scss/_input-group.scss create mode 100644 app/node_modules/bootstrap/scss/_jumbotron.scss create mode 100644 app/node_modules/bootstrap/scss/_list-group.scss create mode 100644 app/node_modules/bootstrap/scss/_media.scss create mode 100644 app/node_modules/bootstrap/scss/_mixins.scss create mode 100644 app/node_modules/bootstrap/scss/_modal.scss create mode 100644 app/node_modules/bootstrap/scss/_nav.scss create mode 100644 app/node_modules/bootstrap/scss/_navbar.scss create mode 100644 app/node_modules/bootstrap/scss/_pagination.scss create mode 100644 app/node_modules/bootstrap/scss/_popover.scss create mode 100644 app/node_modules/bootstrap/scss/_print.scss create mode 100644 app/node_modules/bootstrap/scss/_progress.scss create mode 100644 app/node_modules/bootstrap/scss/_reboot.scss create mode 100644 app/node_modules/bootstrap/scss/_root.scss create mode 100644 app/node_modules/bootstrap/scss/_tables.scss create mode 100644 app/node_modules/bootstrap/scss/_tooltip.scss create mode 100644 app/node_modules/bootstrap/scss/_transitions.scss create mode 100644 app/node_modules/bootstrap/scss/_type.scss create mode 100644 app/node_modules/bootstrap/scss/_utilities.scss create mode 100644 app/node_modules/bootstrap/scss/_variables.scss create mode 100644 app/node_modules/bootstrap/scss/bootstrap-grid.scss create mode 100644 app/node_modules/bootstrap/scss/bootstrap-reboot.scss create mode 100644 app/node_modules/bootstrap/scss/bootstrap.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_alert.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_background-variant.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_badge.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_border-radius.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_box-shadow.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_breakpoints.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_buttons.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_caret.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_clearfix.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_float.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_forms.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_gradients.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_grid-framework.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_grid.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_hover.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_image.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_list-group.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_lists.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_nav-divider.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_pagination.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_reset-text.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_resize.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_screen-reader.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_size.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_table-row.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_text-emphasis.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_text-hide.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_text-truncate.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_transition.scss create mode 100644 app/node_modules/bootstrap/scss/mixins/_visibility.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_align.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_background.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_borders.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_clearfix.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_display.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_embed.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_flex.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_float.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_position.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_screenreaders.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_shadows.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_sizing.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_spacing.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_text.scss create mode 100644 app/node_modules/bootstrap/scss/utilities/_visibility.scss create mode 100644 app/node_modules/brace-expansion/LICENSE create mode 100644 app/node_modules/brace-expansion/README.md create mode 100644 app/node_modules/brace-expansion/index.js create mode 100644 app/node_modules/brace-expansion/package.json create mode 100644 app/node_modules/builtin-modules/builtin-modules.json create mode 100644 app/node_modules/builtin-modules/index.js create mode 100644 app/node_modules/builtin-modules/license create mode 100644 app/node_modules/builtin-modules/package.json create mode 100644 app/node_modules/builtin-modules/readme.md create mode 100644 app/node_modules/builtin-modules/static.js create mode 100644 app/node_modules/camelcase-keys/index.js create mode 100644 app/node_modules/camelcase-keys/license create mode 100644 app/node_modules/camelcase-keys/package.json create mode 100644 app/node_modules/camelcase-keys/readme.md create mode 100644 app/node_modules/camelcase/index.js create mode 100644 app/node_modules/camelcase/license create mode 100644 app/node_modules/camelcase/package.json create mode 100644 app/node_modules/camelcase/readme.md create mode 100644 app/node_modules/caseless/LICENSE create mode 100644 app/node_modules/caseless/README.md create mode 100644 app/node_modules/caseless/index.js create mode 100644 app/node_modules/caseless/package.json create mode 100644 app/node_modules/caseless/test.js mode change 100644 => 100755 app/node_modules/chainsaw/index.js create mode 100644 app/node_modules/co/History.md create mode 100644 app/node_modules/co/LICENSE create mode 100644 app/node_modules/co/Readme.md create mode 100644 app/node_modules/co/index.js create mode 100644 app/node_modules/co/package.json create mode 100644 app/node_modules/code-point-at/index.js create mode 100644 app/node_modules/code-point-at/license create mode 100644 app/node_modules/code-point-at/package.json create mode 100644 app/node_modules/code-point-at/readme.md create mode 100644 app/node_modules/combined-stream/License create mode 100644 app/node_modules/combined-stream/Readme.md create mode 100644 app/node_modules/combined-stream/lib/combined_stream.js create mode 100644 app/node_modules/combined-stream/lib/defer.js create mode 100644 app/node_modules/combined-stream/package.json create mode 100644 app/node_modules/concat-map/.travis.yml create mode 100644 app/node_modules/concat-map/LICENSE create mode 100644 app/node_modules/concat-map/README.markdown create mode 100644 app/node_modules/concat-map/example/map.js create mode 100644 app/node_modules/concat-map/index.js create mode 100644 app/node_modules/concat-map/package.json create mode 100644 app/node_modules/concat-map/test/map.js create mode 100644 app/node_modules/concat-stream/LICENSE create mode 100644 app/node_modules/concat-stream/index.js create mode 100644 app/node_modules/concat-stream/node_modules/isarray/.npmignore create mode 100644 app/node_modules/concat-stream/node_modules/isarray/.travis.yml create mode 100644 app/node_modules/concat-stream/node_modules/isarray/Makefile create mode 100644 app/node_modules/concat-stream/node_modules/isarray/README.md create mode 100644 app/node_modules/concat-stream/node_modules/isarray/component.json create mode 100644 app/node_modules/concat-stream/node_modules/isarray/index.js create mode 100644 app/node_modules/concat-stream/node_modules/isarray/package.json create mode 100644 app/node_modules/concat-stream/node_modules/isarray/test.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/.travis.yml create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js create mode 100644 app/node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 app/node_modules/concat-stream/node_modules/string_decoder/.travis.yml create mode 100644 app/node_modules/concat-stream/node_modules/string_decoder/LICENSE create mode 100644 app/node_modules/concat-stream/node_modules/string_decoder/README.md create mode 100644 app/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js create mode 100644 app/node_modules/concat-stream/node_modules/string_decoder/package.json create mode 100644 app/node_modules/concat-stream/package.json create mode 100644 app/node_modules/concat-stream/readme.md create mode 100644 app/node_modules/core-util-is/LICENSE create mode 100644 app/node_modules/core-util-is/README.md create mode 100644 app/node_modules/core-util-is/float.patch create mode 100644 app/node_modules/core-util-is/lib/util.js create mode 100644 app/node_modules/core-util-is/package.json create mode 100644 app/node_modules/core-util-is/test.js create mode 100644 app/node_modules/cryptiles/.npmignore create mode 100755 app/node_modules/cryptiles/LICENSE create mode 100755 app/node_modules/cryptiles/README.md create mode 100755 app/node_modules/cryptiles/lib/index.js create mode 100755 app/node_modules/cryptiles/node_modules/boom/LICENSE create mode 100755 app/node_modules/cryptiles/node_modules/boom/README.md create mode 100755 app/node_modules/cryptiles/node_modules/boom/lib/index.js create mode 100644 app/node_modules/cryptiles/node_modules/boom/package.json create mode 100755 app/node_modules/cryptiles/package.json create mode 100644 app/node_modules/currently-unhandled/browser.js create mode 100644 app/node_modules/currently-unhandled/core.js create mode 100644 app/node_modules/currently-unhandled/index.js create mode 100644 app/node_modules/currently-unhandled/license create mode 100644 app/node_modules/currently-unhandled/package.json create mode 100644 app/node_modules/currently-unhandled/readme.md create mode 100644 app/node_modules/dashdash/CHANGES.md create mode 100644 app/node_modules/dashdash/LICENSE.txt create mode 100644 app/node_modules/dashdash/README.md create mode 100644 app/node_modules/dashdash/etc/dashdash.bash_completion.in create mode 100644 app/node_modules/dashdash/lib/dashdash.js create mode 100644 app/node_modules/dashdash/package.json create mode 100644 app/node_modules/debug/.coveralls.yml create mode 100644 app/node_modules/debug/.eslintrc create mode 100644 app/node_modules/debug/.npmignore create mode 100644 app/node_modules/debug/.travis.yml create mode 100644 app/node_modules/debug/CHANGELOG.md create mode 100644 app/node_modules/debug/LICENSE create mode 100644 app/node_modules/debug/Makefile create mode 100644 app/node_modules/debug/README.md create mode 100644 app/node_modules/debug/component.json create mode 100644 app/node_modules/debug/karma.conf.js create mode 100644 app/node_modules/debug/node.js create mode 100644 app/node_modules/debug/package.json create mode 100644 app/node_modules/debug/src/browser.js create mode 100644 app/node_modules/debug/src/debug.js create mode 100644 app/node_modules/debug/src/index.js create mode 100644 app/node_modules/debug/src/inspector-log.js create mode 100644 app/node_modules/debug/src/node.js create mode 100644 app/node_modules/decamelize/index.js create mode 100644 app/node_modules/decamelize/license create mode 100644 app/node_modules/decamelize/package.json create mode 100644 app/node_modules/decamelize/readme.md mode change 100644 => 100755 app/node_modules/decompress-zip/bin/decompress-zip create mode 100644 app/node_modules/deep-extend/CHANGELOG.md create mode 100644 app/node_modules/deep-extend/LICENSE create mode 100644 app/node_modules/deep-extend/README.md create mode 100644 app/node_modules/deep-extend/index.js create mode 100644 app/node_modules/deep-extend/lib/deep-extend.js create mode 100644 app/node_modules/deep-extend/package.json create mode 100644 app/node_modules/delayed-stream/.npmignore create mode 100644 app/node_modules/delayed-stream/License create mode 100644 app/node_modules/delayed-stream/Makefile create mode 100644 app/node_modules/delayed-stream/Readme.md create mode 100644 app/node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 app/node_modules/delayed-stream/package.json create mode 100644 app/node_modules/ecc-jsbn/.npmignore create mode 100644 app/node_modules/ecc-jsbn/LICENSE create mode 100644 app/node_modules/ecc-jsbn/README.md create mode 100644 app/node_modules/ecc-jsbn/index.js create mode 100644 app/node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100644 app/node_modules/ecc-jsbn/lib/ec.js create mode 100644 app/node_modules/ecc-jsbn/lib/sec.js create mode 100644 app/node_modules/ecc-jsbn/package.json create mode 100644 app/node_modules/ecc-jsbn/test.js create mode 100644 app/node_modules/ejs/Jakefile create mode 100644 app/node_modules/ejs/LICENSE create mode 100644 app/node_modules/ejs/README.md create mode 100644 app/node_modules/ejs/ejs.js create mode 100644 app/node_modules/ejs/ejs.min.js create mode 100755 app/node_modules/ejs/lib/ejs.js create mode 100644 app/node_modules/ejs/lib/utils.js create mode 100644 app/node_modules/ejs/package.json create mode 100755 app/node_modules/electron-download/build/cli.js create mode 100644 app/node_modules/electron-download/build/index.js create mode 100644 app/node_modules/electron-download/collaborators.md create mode 100644 app/node_modules/electron-download/package.json create mode 100644 app/node_modules/electron-download/readme.md create mode 100644 app/node_modules/electron-in-page-search/LICENSE create mode 100644 app/node_modules/electron-in-page-search/README.md create mode 100644 app/node_modules/electron-in-page-search/example/browser-window/index.html create mode 100644 app/node_modules/electron-in-page-search/example/browser-window/main.js create mode 100644 app/node_modules/electron-in-page-search/example/browser-window/package.json create mode 100644 app/node_modules/electron-in-page-search/example/browser-window/renderer.js create mode 100644 app/node_modules/electron-in-page-search/example/browser-window/style.css create mode 100644 app/node_modules/electron-in-page-search/example/webview/index.html create mode 100644 app/node_modules/electron-in-page-search/example/webview/main.js create mode 100644 app/node_modules/electron-in-page-search/example/webview/package.json create mode 100644 app/node_modules/electron-in-page-search/example/webview/renderer.js create mode 100644 app/node_modules/electron-in-page-search/example/webview/style.css create mode 100644 app/node_modules/electron-in-page-search/example/webview/webview-content.html create mode 100644 app/node_modules/electron-in-page-search/index.d.ts create mode 100644 app/node_modules/electron-in-page-search/package.json create mode 100644 app/node_modules/electron-in-page-search/src/default-style.css create mode 100644 app/node_modules/electron-in-page-search/src/index.js create mode 100644 app/node_modules/electron-in-page-search/src/index.js.map create mode 100644 app/node_modules/electron-in-page-search/src/index.ts create mode 100644 app/node_modules/electron-in-page-search/src/search-window.html create mode 100644 app/node_modules/electron-in-page-search/src/search-window.js create mode 100644 app/node_modules/electron-in-page-search/src/search-window.js.map create mode 100644 app/node_modules/electron-in-page-search/src/search-window.ts create mode 100644 app/node_modules/electron-in-page-search/test/smoke_browser_window_test.js create mode 100644 app/node_modules/electron-in-page-search/test/smoke_browser_window_test.js.map create mode 100644 app/node_modules/electron-in-page-search/test/smoke_browser_window_test.ts create mode 100644 app/node_modules/electron-in-page-search/test/smoke_webview_test.js create mode 100644 app/node_modules/electron-in-page-search/test/smoke_webview_test.js.map create mode 100644 app/node_modules/electron-in-page-search/test/smoke_webview_test.ts create mode 100644 app/node_modules/electron-in-page-search/tsconfig.json create mode 100644 app/node_modules/electron-is-accelerator/.jshintrc create mode 100644 app/node_modules/electron-is-accelerator/.npmignore create mode 100755 app/node_modules/electron-is-accelerator/.travis.yml create mode 100644 app/node_modules/electron-is-accelerator/LICENSE create mode 100644 app/node_modules/electron-is-accelerator/README.md create mode 100644 app/node_modules/electron-is-accelerator/index.js create mode 100644 app/node_modules/electron-is-accelerator/package.json create mode 100644 app/node_modules/electron-is-accelerator/test.js create mode 100644 app/node_modules/electron-localshortcut/README.md create mode 100644 app/node_modules/electron-localshortcut/index.js create mode 100644 app/node_modules/electron-localshortcut/license create mode 100644 app/node_modules/electron-localshortcut/package.json mode change 100644 => 100755 app/node_modules/electron-osx-sign/bin/electron-osx-flat.js mode change 100644 => 100755 app/node_modules/electron-osx-sign/bin/electron-osx-sign.js mode change 100644 => 100755 app/node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist mode change 100644 => 100755 app/node_modules/electron-osx-sign/default.entitlements.mas.plist mode change 100644 => 100755 app/node_modules/electron-packager/cli.js mode change 100644 => 120000 app/node_modules/electron-packager/node_modules/.bin/electron-download delete mode 100644 app/node_modules/electron-packager/node_modules/.bin/electron-download.cmd mode change 100644 => 100755 app/node_modules/electron-packager/node_modules/electron-download/lib/cli.js mode change 100644 => 100755 app/node_modules/electron-packager/test/ci/_before_script.js mode change 100644 => 100755 app/node_modules/electron-packager/test/ci/before_install.sh create mode 100644 app/node_modules/electron/LICENSE create mode 100644 app/node_modules/electron/README.md create mode 100755 app/node_modules/electron/cli.js create mode 100644 app/node_modules/electron/electron.d.ts create mode 100644 app/node_modules/electron/index.js create mode 100644 app/node_modules/electron/install.js create mode 100644 app/node_modules/electron/package.json create mode 100644 app/node_modules/electron/path.txt create mode 100644 app/node_modules/error-ex/LICENSE create mode 100644 app/node_modules/error-ex/README.md create mode 100644 app/node_modules/error-ex/index.js create mode 100644 app/node_modules/error-ex/package.json create mode 100644 app/node_modules/es6-promise/CHANGELOG.md create mode 100644 app/node_modules/es6-promise/LICENSE create mode 100644 app/node_modules/es6-promise/README.md create mode 100644 app/node_modules/es6-promise/auto.js create mode 100644 app/node_modules/es6-promise/es6-promise.d.ts create mode 100644 app/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 app/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 app/node_modules/es6-promise/package.json create mode 100644 app/node_modules/extend/.eslintrc create mode 100644 app/node_modules/extend/.jscs.json create mode 100644 app/node_modules/extend/.npmignore create mode 100644 app/node_modules/extend/.travis.yml create mode 100644 app/node_modules/extend/CHANGELOG.md create mode 100644 app/node_modules/extend/LICENSE create mode 100644 app/node_modules/extend/README.md create mode 100644 app/node_modules/extend/component.json create mode 100644 app/node_modules/extend/index.js create mode 100644 app/node_modules/extend/package.json create mode 100644 app/node_modules/extract-zip/.npmignore create mode 100644 app/node_modules/extract-zip/.travis.yml create mode 100644 app/node_modules/extract-zip/CONTRIBUTING.md create mode 100644 app/node_modules/extract-zip/LICENSE create mode 100755 app/node_modules/extract-zip/cli.js create mode 100644 app/node_modules/extract-zip/index.js create mode 100644 app/node_modules/extract-zip/package.json create mode 100644 app/node_modules/extract-zip/readme.md create mode 100644 app/node_modules/extsprintf/.gitmodules create mode 100644 app/node_modules/extsprintf/.npmignore create mode 100644 app/node_modules/extsprintf/LICENSE create mode 100644 app/node_modules/extsprintf/Makefile create mode 100644 app/node_modules/extsprintf/Makefile.targ create mode 100644 app/node_modules/extsprintf/README.md create mode 100644 app/node_modules/extsprintf/jsl.node.conf create mode 100644 app/node_modules/extsprintf/lib/extsprintf.js create mode 100644 app/node_modules/extsprintf/package.json create mode 100644 app/node_modules/fast-deep-equal/LICENSE create mode 100644 app/node_modules/fast-deep-equal/README.md create mode 100644 app/node_modules/fast-deep-equal/index.d.ts create mode 100644 app/node_modules/fast-deep-equal/index.js create mode 100644 app/node_modules/fast-deep-equal/package.json create mode 100644 app/node_modules/fast-json-stable-stringify/.eslintrc.yml create mode 100644 app/node_modules/fast-json-stable-stringify/.npmignore create mode 100644 app/node_modules/fast-json-stable-stringify/.travis.yml create mode 100644 app/node_modules/fast-json-stable-stringify/LICENSE create mode 100644 app/node_modules/fast-json-stable-stringify/README.md create mode 100644 app/node_modules/fast-json-stable-stringify/benchmark/index.js create mode 100644 app/node_modules/fast-json-stable-stringify/benchmark/test.json create mode 100644 app/node_modules/fast-json-stable-stringify/example/key_cmp.js create mode 100644 app/node_modules/fast-json-stable-stringify/example/nested.js create mode 100644 app/node_modules/fast-json-stable-stringify/example/str.js create mode 100644 app/node_modules/fast-json-stable-stringify/example/value_cmp.js create mode 100644 app/node_modules/fast-json-stable-stringify/index.js create mode 100644 app/node_modules/fast-json-stable-stringify/package.json create mode 100644 app/node_modules/fast-json-stable-stringify/test/cmp.js create mode 100644 app/node_modules/fast-json-stable-stringify/test/nested.js create mode 100644 app/node_modules/fast-json-stable-stringify/test/str.js create mode 100644 app/node_modules/fast-json-stable-stringify/test/to-json.js create mode 100644 app/node_modules/fd-slicer/.npmignore create mode 100644 app/node_modules/fd-slicer/.travis.yml create mode 100644 app/node_modules/fd-slicer/CHANGELOG.md create mode 100644 app/node_modules/fd-slicer/LICENSE create mode 100644 app/node_modules/fd-slicer/README.md create mode 100644 app/node_modules/fd-slicer/index.js create mode 100644 app/node_modules/fd-slicer/package.json create mode 100644 app/node_modules/fd-slicer/test/test.js create mode 100644 app/node_modules/find-up/index.js create mode 100644 app/node_modules/find-up/license create mode 100644 app/node_modules/find-up/package.json create mode 100644 app/node_modules/find-up/readme.md create mode 100644 app/node_modules/forever-agent/LICENSE create mode 100644 app/node_modules/forever-agent/README.md create mode 100644 app/node_modules/forever-agent/index.js create mode 100644 app/node_modules/forever-agent/package.json create mode 100644 app/node_modules/form-data/License create mode 100644 app/node_modules/form-data/README.md create mode 100644 app/node_modules/form-data/README.md.bak create mode 100644 app/node_modules/form-data/lib/browser.js create mode 100644 app/node_modules/form-data/lib/form_data.js create mode 100644 app/node_modules/form-data/lib/populate.js create mode 100644 app/node_modules/form-data/package.json create mode 100644 app/node_modules/fs-extra/.npmignore create mode 100644 app/node_modules/fs-extra/CHANGELOG.md create mode 100644 app/node_modules/fs-extra/LICENSE create mode 100644 app/node_modules/fs-extra/README.md create mode 100644 app/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 app/node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 app/node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 app/node_modules/fs-extra/lib/copy/copy.js create mode 100644 app/node_modules/fs-extra/lib/copy/index.js create mode 100644 app/node_modules/fs-extra/lib/copy/ncp.js create mode 100644 app/node_modules/fs-extra/lib/empty/index.js create mode 100644 app/node_modules/fs-extra/lib/ensure/file.js create mode 100644 app/node_modules/fs-extra/lib/ensure/index.js create mode 100644 app/node_modules/fs-extra/lib/ensure/link.js create mode 100644 app/node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 app/node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 app/node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 app/node_modules/fs-extra/lib/index.js create mode 100644 app/node_modules/fs-extra/lib/json/index.js create mode 100644 app/node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 app/node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 app/node_modules/fs-extra/lib/json/output-json.js create mode 100644 app/node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 app/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 app/node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 app/node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 app/node_modules/fs-extra/lib/move/index.js create mode 100644 app/node_modules/fs-extra/lib/output/index.js create mode 100644 app/node_modules/fs-extra/lib/remove/index.js create mode 100644 app/node_modules/fs-extra/lib/util/assign.js create mode 100644 app/node_modules/fs-extra/lib/util/utimes.js create mode 100644 app/node_modules/fs-extra/lib/walk/index.js create mode 100644 app/node_modules/fs-extra/package.json create mode 100644 app/node_modules/fs.realpath/LICENSE create mode 100644 app/node_modules/fs.realpath/README.md create mode 100644 app/node_modules/fs.realpath/index.js create mode 100644 app/node_modules/fs.realpath/old.js create mode 100644 app/node_modules/fs.realpath/package.json create mode 100644 app/node_modules/get-stdin/index.js create mode 100644 app/node_modules/get-stdin/package.json create mode 100644 app/node_modules/get-stdin/readme.md create mode 100644 app/node_modules/getpass/.npmignore create mode 100644 app/node_modules/getpass/.travis.yml create mode 100644 app/node_modules/getpass/LICENSE create mode 100644 app/node_modules/getpass/README.md create mode 100644 app/node_modules/getpass/lib/index.js create mode 100644 app/node_modules/getpass/package.json create mode 100644 app/node_modules/glob/LICENSE create mode 100644 app/node_modules/glob/README.md create mode 100644 app/node_modules/glob/changelog.md create mode 100644 app/node_modules/glob/common.js create mode 100644 app/node_modules/glob/glob.js create mode 100644 app/node_modules/glob/package.json create mode 100644 app/node_modules/glob/sync.js create mode 100644 app/node_modules/graceful-fs/LICENSE create mode 100644 app/node_modules/graceful-fs/README.md create mode 100644 app/node_modules/graceful-fs/fs.js create mode 100644 app/node_modules/graceful-fs/graceful-fs.js create mode 100644 app/node_modules/graceful-fs/legacy-streams.js create mode 100644 app/node_modules/graceful-fs/package.json create mode 100644 app/node_modules/graceful-fs/polyfills.js create mode 100644 app/node_modules/har-schema/LICENSE create mode 100644 app/node_modules/har-schema/README.md create mode 100644 app/node_modules/har-schema/lib/afterRequest.json create mode 100644 app/node_modules/har-schema/lib/beforeRequest.json create mode 100644 app/node_modules/har-schema/lib/browser.json create mode 100644 app/node_modules/har-schema/lib/cache.json create mode 100644 app/node_modules/har-schema/lib/content.json create mode 100644 app/node_modules/har-schema/lib/cookie.json create mode 100644 app/node_modules/har-schema/lib/creator.json create mode 100644 app/node_modules/har-schema/lib/entry.json create mode 100644 app/node_modules/har-schema/lib/har.json create mode 100644 app/node_modules/har-schema/lib/header.json create mode 100644 app/node_modules/har-schema/lib/index.js create mode 100644 app/node_modules/har-schema/lib/log.json create mode 100644 app/node_modules/har-schema/lib/page.json create mode 100644 app/node_modules/har-schema/lib/pageTimings.json create mode 100644 app/node_modules/har-schema/lib/postData.json create mode 100644 app/node_modules/har-schema/lib/query.json create mode 100644 app/node_modules/har-schema/lib/request.json create mode 100644 app/node_modules/har-schema/lib/response.json create mode 100644 app/node_modules/har-schema/lib/timings.json create mode 100644 app/node_modules/har-schema/package.json create mode 100644 app/node_modules/har-validator/LICENSE create mode 100644 app/node_modules/har-validator/README.md create mode 100644 app/node_modules/har-validator/lib/async.js create mode 100644 app/node_modules/har-validator/lib/error.js create mode 100644 app/node_modules/har-validator/lib/promise.js create mode 100644 app/node_modules/har-validator/package.json create mode 100755 app/node_modules/hawk/.npmignore create mode 100755 app/node_modules/hawk/LICENSE create mode 100755 app/node_modules/hawk/README.md create mode 100755 app/node_modules/hawk/client.js create mode 100755 app/node_modules/hawk/lib/browser.js create mode 100755 app/node_modules/hawk/lib/client.js create mode 100755 app/node_modules/hawk/lib/crypto.js create mode 100755 app/node_modules/hawk/lib/index.js create mode 100755 app/node_modules/hawk/lib/server.js create mode 100755 app/node_modules/hawk/lib/utils.js create mode 100755 app/node_modules/hawk/package.json create mode 100644 app/node_modules/hoek/.npmignore create mode 100644 app/node_modules/hoek/LICENSE create mode 100644 app/node_modules/hoek/README.md create mode 100755 app/node_modules/hoek/lib/escape.js create mode 100755 app/node_modules/hoek/lib/index.js create mode 100644 app/node_modules/hoek/package.json create mode 100644 app/node_modules/home-path/.travis.yml create mode 100644 app/node_modules/home-path/LICENSE create mode 100644 app/node_modules/home-path/README.hbs create mode 100644 app/node_modules/home-path/README.md create mode 100644 app/node_modules/home-path/index.js create mode 100644 app/node_modules/home-path/package.json create mode 100644 app/node_modules/home-path/test.js create mode 100644 app/node_modules/hosted-git-info/CHANGELOG.md create mode 100644 app/node_modules/hosted-git-info/LICENSE create mode 100644 app/node_modules/hosted-git-info/README.md create mode 100644 app/node_modules/hosted-git-info/git-host-info.js create mode 100644 app/node_modules/hosted-git-info/git-host.js create mode 100644 app/node_modules/hosted-git-info/index.js create mode 100644 app/node_modules/hosted-git-info/package.json create mode 100644 app/node_modules/http-signature/.dir-locals.el create mode 100644 app/node_modules/http-signature/.npmignore create mode 100644 app/node_modules/http-signature/CHANGES.md create mode 100644 app/node_modules/http-signature/LICENSE create mode 100644 app/node_modules/http-signature/README.md create mode 100644 app/node_modules/http-signature/http_signing.md create mode 100644 app/node_modules/http-signature/lib/index.js create mode 100644 app/node_modules/http-signature/lib/parser.js create mode 100644 app/node_modules/http-signature/lib/signer.js create mode 100644 app/node_modules/http-signature/lib/utils.js create mode 100644 app/node_modules/http-signature/lib/verify.js create mode 100644 app/node_modules/http-signature/package.json create mode 100644 app/node_modules/indent-string/index.js create mode 100644 app/node_modules/indent-string/license create mode 100644 app/node_modules/indent-string/package.json create mode 100644 app/node_modules/indent-string/readme.md create mode 100644 app/node_modules/inflight/LICENSE create mode 100644 app/node_modules/inflight/README.md create mode 100644 app/node_modules/inflight/inflight.js create mode 100644 app/node_modules/inflight/package.json create mode 100644 app/node_modules/inherits/LICENSE create mode 100644 app/node_modules/inherits/README.md create mode 100644 app/node_modules/inherits/inherits.js create mode 100644 app/node_modules/inherits/inherits_browser.js create mode 100644 app/node_modules/inherits/package.json create mode 100644 app/node_modules/ini/LICENSE create mode 100644 app/node_modules/ini/README.md create mode 100644 app/node_modules/ini/ini.js create mode 100644 app/node_modules/ini/package.json create mode 100644 app/node_modules/is-arrayish/.editorconfig create mode 100644 app/node_modules/is-arrayish/.istanbul.yml create mode 100644 app/node_modules/is-arrayish/.npmignore create mode 100644 app/node_modules/is-arrayish/.travis.yml create mode 100644 app/node_modules/is-arrayish/LICENSE create mode 100644 app/node_modules/is-arrayish/README.md create mode 100644 app/node_modules/is-arrayish/index.js create mode 100644 app/node_modules/is-arrayish/package.json create mode 100644 app/node_modules/is-builtin-module/index.js create mode 100644 app/node_modules/is-builtin-module/license create mode 100644 app/node_modules/is-builtin-module/package.json create mode 100644 app/node_modules/is-builtin-module/readme.md create mode 100644 app/node_modules/is-finite/index.js create mode 100644 app/node_modules/is-finite/license create mode 100644 app/node_modules/is-finite/package.json create mode 100644 app/node_modules/is-finite/readme.md create mode 100644 app/node_modules/is-fullwidth-code-point/index.js create mode 100644 app/node_modules/is-fullwidth-code-point/license create mode 100644 app/node_modules/is-fullwidth-code-point/package.json create mode 100644 app/node_modules/is-fullwidth-code-point/readme.md create mode 100644 app/node_modules/is-typedarray/LICENSE.md create mode 100644 app/node_modules/is-typedarray/README.md create mode 100644 app/node_modules/is-typedarray/index.js create mode 100644 app/node_modules/is-typedarray/package.json create mode 100644 app/node_modules/is-typedarray/test.js create mode 100644 app/node_modules/is-utf8/LICENSE create mode 100644 app/node_modules/is-utf8/README.md create mode 100644 app/node_modules/is-utf8/is-utf8.js create mode 100644 app/node_modules/is-utf8/package.json create mode 100644 app/node_modules/isarray/README.md create mode 100644 app/node_modules/isarray/build/build.js create mode 100644 app/node_modules/isarray/component.json create mode 100644 app/node_modules/isarray/index.js create mode 100644 app/node_modules/isarray/package.json create mode 100644 app/node_modules/isstream/.jshintrc create mode 100644 app/node_modules/isstream/.npmignore create mode 100644 app/node_modules/isstream/.travis.yml create mode 100644 app/node_modules/isstream/LICENSE.md create mode 100644 app/node_modules/isstream/README.md create mode 100644 app/node_modules/isstream/isstream.js create mode 100644 app/node_modules/isstream/package.json create mode 100644 app/node_modules/isstream/test.js create mode 100644 app/node_modules/jquery/AUTHORS.txt create mode 100644 app/node_modules/jquery/LICENSE.txt create mode 100644 app/node_modules/jquery/README.md create mode 100644 app/node_modules/jquery/bower.json create mode 100644 app/node_modules/jquery/external/sizzle/LICENSE.txt create mode 100644 app/node_modules/jquery/package.json create mode 100644 app/node_modules/jquery/src/.eslintrc.json create mode 100644 app/node_modules/jquery/src/ajax.js create mode 100644 app/node_modules/jquery/src/ajax/jsonp.js create mode 100644 app/node_modules/jquery/src/ajax/load.js create mode 100644 app/node_modules/jquery/src/ajax/parseXML.js create mode 100644 app/node_modules/jquery/src/ajax/script.js create mode 100644 app/node_modules/jquery/src/ajax/var/location.js create mode 100644 app/node_modules/jquery/src/ajax/var/nonce.js create mode 100644 app/node_modules/jquery/src/ajax/var/rquery.js create mode 100644 app/node_modules/jquery/src/ajax/xhr.js create mode 100644 app/node_modules/jquery/src/attributes.js create mode 100644 app/node_modules/jquery/src/attributes/attr.js create mode 100644 app/node_modules/jquery/src/attributes/classes.js create mode 100644 app/node_modules/jquery/src/attributes/prop.js create mode 100644 app/node_modules/jquery/src/attributes/support.js create mode 100644 app/node_modules/jquery/src/attributes/val.js create mode 100644 app/node_modules/jquery/src/callbacks.js create mode 100644 app/node_modules/jquery/src/core.js create mode 100644 app/node_modules/jquery/src/core/DOMEval.js create mode 100644 app/node_modules/jquery/src/core/access.js create mode 100644 app/node_modules/jquery/src/core/camelCase.js create mode 100644 app/node_modules/jquery/src/core/init.js create mode 100644 app/node_modules/jquery/src/core/nodeName.js create mode 100644 app/node_modules/jquery/src/core/parseHTML.js create mode 100644 app/node_modules/jquery/src/core/ready-no-deferred.js create mode 100644 app/node_modules/jquery/src/core/ready.js create mode 100644 app/node_modules/jquery/src/core/readyException.js create mode 100644 app/node_modules/jquery/src/core/stripAndCollapse.js create mode 100644 app/node_modules/jquery/src/core/support.js create mode 100644 app/node_modules/jquery/src/core/toType.js create mode 100644 app/node_modules/jquery/src/core/var/rsingleTag.js create mode 100644 app/node_modules/jquery/src/css.js create mode 100644 app/node_modules/jquery/src/css/addGetHookIf.js create mode 100644 app/node_modules/jquery/src/css/adjustCSS.js create mode 100644 app/node_modules/jquery/src/css/curCSS.js create mode 100644 app/node_modules/jquery/src/css/hiddenVisibleSelectors.js create mode 100644 app/node_modules/jquery/src/css/showHide.js create mode 100644 app/node_modules/jquery/src/css/support.js create mode 100644 app/node_modules/jquery/src/css/var/cssExpand.js create mode 100644 app/node_modules/jquery/src/css/var/getStyles.js create mode 100644 app/node_modules/jquery/src/css/var/isHiddenWithinTree.js create mode 100644 app/node_modules/jquery/src/css/var/rboxStyle.js create mode 100644 app/node_modules/jquery/src/css/var/rnumnonpx.js create mode 100644 app/node_modules/jquery/src/css/var/swap.js create mode 100644 app/node_modules/jquery/src/data.js create mode 100644 app/node_modules/jquery/src/data/Data.js create mode 100644 app/node_modules/jquery/src/data/var/acceptData.js create mode 100644 app/node_modules/jquery/src/data/var/dataPriv.js create mode 100644 app/node_modules/jquery/src/data/var/dataUser.js create mode 100644 app/node_modules/jquery/src/deferred.js create mode 100644 app/node_modules/jquery/src/deferred/exceptionHook.js create mode 100644 app/node_modules/jquery/src/deprecated.js create mode 100644 app/node_modules/jquery/src/dimensions.js create mode 100644 app/node_modules/jquery/src/effects.js create mode 100644 app/node_modules/jquery/src/effects/Tween.js create mode 100644 app/node_modules/jquery/src/effects/animatedSelector.js create mode 100644 app/node_modules/jquery/src/event.js create mode 100644 app/node_modules/jquery/src/event/ajax.js create mode 100644 app/node_modules/jquery/src/event/alias.js create mode 100644 app/node_modules/jquery/src/event/focusin.js create mode 100644 app/node_modules/jquery/src/event/support.js create mode 100644 app/node_modules/jquery/src/event/trigger.js create mode 100644 app/node_modules/jquery/src/exports/amd.js create mode 100644 app/node_modules/jquery/src/exports/global.js create mode 100644 app/node_modules/jquery/src/jquery.js create mode 100644 app/node_modules/jquery/src/manipulation.js create mode 100644 app/node_modules/jquery/src/manipulation/_evalUrl.js create mode 100644 app/node_modules/jquery/src/manipulation/buildFragment.js create mode 100644 app/node_modules/jquery/src/manipulation/getAll.js create mode 100644 app/node_modules/jquery/src/manipulation/setGlobalEval.js create mode 100644 app/node_modules/jquery/src/manipulation/support.js create mode 100644 app/node_modules/jquery/src/manipulation/var/rcheckableType.js create mode 100644 app/node_modules/jquery/src/manipulation/var/rscriptType.js create mode 100644 app/node_modules/jquery/src/manipulation/var/rtagName.js create mode 100644 app/node_modules/jquery/src/manipulation/wrapMap.js create mode 100644 app/node_modules/jquery/src/offset.js create mode 100644 app/node_modules/jquery/src/queue.js create mode 100644 app/node_modules/jquery/src/queue/delay.js create mode 100644 app/node_modules/jquery/src/selector-native.js create mode 100644 app/node_modules/jquery/src/selector-sizzle.js create mode 100644 app/node_modules/jquery/src/selector.js create mode 100644 app/node_modules/jquery/src/serialize.js create mode 100644 app/node_modules/jquery/src/traversing.js create mode 100644 app/node_modules/jquery/src/traversing/findFilter.js create mode 100644 app/node_modules/jquery/src/traversing/var/dir.js create mode 100644 app/node_modules/jquery/src/traversing/var/rneedsContext.js create mode 100644 app/node_modules/jquery/src/traversing/var/siblings.js create mode 100644 app/node_modules/jquery/src/var/ObjectFunctionString.js create mode 100644 app/node_modules/jquery/src/var/arr.js create mode 100644 app/node_modules/jquery/src/var/class2type.js create mode 100644 app/node_modules/jquery/src/var/concat.js create mode 100644 app/node_modules/jquery/src/var/document.js create mode 100644 app/node_modules/jquery/src/var/documentElement.js create mode 100644 app/node_modules/jquery/src/var/fnToString.js create mode 100644 app/node_modules/jquery/src/var/getProto.js create mode 100644 app/node_modules/jquery/src/var/hasOwn.js create mode 100644 app/node_modules/jquery/src/var/indexOf.js create mode 100644 app/node_modules/jquery/src/var/isFunction.js create mode 100644 app/node_modules/jquery/src/var/isWindow.js create mode 100644 app/node_modules/jquery/src/var/pnum.js create mode 100644 app/node_modules/jquery/src/var/push.js create mode 100644 app/node_modules/jquery/src/var/rcssNum.js create mode 100644 app/node_modules/jquery/src/var/rnothtmlwhite.js create mode 100644 app/node_modules/jquery/src/var/slice.js create mode 100644 app/node_modules/jquery/src/var/support.js create mode 100644 app/node_modules/jquery/src/var/toString.js create mode 100644 app/node_modules/jquery/src/wrap.js create mode 100644 app/node_modules/jsbn/.npmignore create mode 100644 app/node_modules/jsbn/LICENSE create mode 100644 app/node_modules/jsbn/README.md create mode 100644 app/node_modules/jsbn/example.html create mode 100644 app/node_modules/jsbn/example.js create mode 100644 app/node_modules/jsbn/index.js create mode 100644 app/node_modules/jsbn/package.json create mode 100644 app/node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 app/node_modules/json-schema-traverse/.npmignore create mode 100644 app/node_modules/json-schema-traverse/.travis.yml create mode 100644 app/node_modules/json-schema-traverse/LICENSE create mode 100644 app/node_modules/json-schema-traverse/README.md create mode 100644 app/node_modules/json-schema-traverse/index.js create mode 100644 app/node_modules/json-schema-traverse/package.json create mode 100644 app/node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 app/node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 app/node_modules/json-schema-traverse/spec/index.spec.js create mode 100644 app/node_modules/json-schema/README.md create mode 100644 app/node_modules/json-schema/draft-00/hyper-schema create mode 100644 app/node_modules/json-schema/draft-00/json-ref create mode 100644 app/node_modules/json-schema/draft-00/links create mode 100644 app/node_modules/json-schema/draft-00/schema create mode 100644 app/node_modules/json-schema/draft-01/hyper-schema create mode 100644 app/node_modules/json-schema/draft-01/json-ref create mode 100644 app/node_modules/json-schema/draft-01/links create mode 100644 app/node_modules/json-schema/draft-01/schema create mode 100644 app/node_modules/json-schema/draft-02/hyper-schema create mode 100644 app/node_modules/json-schema/draft-02/json-ref create mode 100644 app/node_modules/json-schema/draft-02/links create mode 100644 app/node_modules/json-schema/draft-02/schema create mode 100644 app/node_modules/json-schema/draft-03/examples/address create mode 100644 app/node_modules/json-schema/draft-03/examples/calendar create mode 100644 app/node_modules/json-schema/draft-03/examples/card create mode 100644 app/node_modules/json-schema/draft-03/examples/geo create mode 100644 app/node_modules/json-schema/draft-03/examples/interfaces create mode 100644 app/node_modules/json-schema/draft-03/hyper-schema create mode 100644 app/node_modules/json-schema/draft-03/json-ref create mode 100644 app/node_modules/json-schema/draft-03/links create mode 100644 app/node_modules/json-schema/draft-03/schema create mode 100644 app/node_modules/json-schema/draft-04/hyper-schema create mode 100644 app/node_modules/json-schema/draft-04/links create mode 100644 app/node_modules/json-schema/draft-04/schema create mode 100644 app/node_modules/json-schema/draft-zyp-json-schema-03.xml create mode 100644 app/node_modules/json-schema/draft-zyp-json-schema-04.xml create mode 100644 app/node_modules/json-schema/lib/links.js create mode 100644 app/node_modules/json-schema/lib/validate.js create mode 100644 app/node_modules/json-schema/package.json create mode 100644 app/node_modules/json-schema/test/tests.js create mode 100644 app/node_modules/json-stringify-safe/.npmignore create mode 100644 app/node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 app/node_modules/json-stringify-safe/LICENSE create mode 100644 app/node_modules/json-stringify-safe/Makefile create mode 100644 app/node_modules/json-stringify-safe/README.md create mode 100644 app/node_modules/json-stringify-safe/package.json create mode 100644 app/node_modules/json-stringify-safe/stringify.js create mode 100644 app/node_modules/json-stringify-safe/test/mocha.opts create mode 100644 app/node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 app/node_modules/jsonfile/.npmignore create mode 100644 app/node_modules/jsonfile/CHANGELOG.md create mode 100644 app/node_modules/jsonfile/LICENSE create mode 100644 app/node_modules/jsonfile/README.md create mode 100644 app/node_modules/jsonfile/appveyor.yml create mode 100644 app/node_modules/jsonfile/index.js create mode 100644 app/node_modules/jsonfile/package.json create mode 100644 app/node_modules/jsprim/CHANGES.md create mode 100644 app/node_modules/jsprim/CONTRIBUTING.md create mode 100644 app/node_modules/jsprim/LICENSE create mode 100644 app/node_modules/jsprim/README.md create mode 100644 app/node_modules/jsprim/lib/jsprim.js create mode 100644 app/node_modules/jsprim/package.json create mode 100644 app/node_modules/keyboardevent-from-electron-accelerator/README.md create mode 100644 app/node_modules/keyboardevent-from-electron-accelerator/example.js create mode 100644 app/node_modules/keyboardevent-from-electron-accelerator/index.js create mode 100644 app/node_modules/keyboardevent-from-electron-accelerator/license create mode 100644 app/node_modules/keyboardevent-from-electron-accelerator/package.json create mode 100644 app/node_modules/keyboardevents-areequal/README.md create mode 100644 app/node_modules/keyboardevents-areequal/example.js create mode 100644 app/node_modules/keyboardevents-areequal/index.js create mode 100644 app/node_modules/keyboardevents-areequal/license create mode 100644 app/node_modules/keyboardevents-areequal/package.json create mode 100644 app/node_modules/klaw/.npmignore create mode 100644 app/node_modules/klaw/CHANGELOG.md create mode 100644 app/node_modules/klaw/LICENSE create mode 100644 app/node_modules/klaw/README.md create mode 100644 app/node_modules/klaw/package.json create mode 100644 app/node_modules/klaw/src/assign.js create mode 100644 app/node_modules/klaw/src/index.js create mode 100644 app/node_modules/load-json-file/index.js create mode 100644 app/node_modules/load-json-file/license create mode 100644 app/node_modules/load-json-file/package.json create mode 100644 app/node_modules/load-json-file/readme.md create mode 100644 app/node_modules/loud-rejection/api.js create mode 100644 app/node_modules/loud-rejection/index.js create mode 100644 app/node_modules/loud-rejection/license create mode 100644 app/node_modules/loud-rejection/package.json create mode 100644 app/node_modules/loud-rejection/readme.md create mode 100644 app/node_modules/loud-rejection/register.js create mode 100644 app/node_modules/map-obj/index.js create mode 100644 app/node_modules/map-obj/license create mode 100644 app/node_modules/map-obj/package.json create mode 100644 app/node_modules/map-obj/readme.md create mode 100644 app/node_modules/meow/index.js create mode 100644 app/node_modules/meow/license create mode 100644 app/node_modules/meow/package.json create mode 100644 app/node_modules/meow/readme.md create mode 100644 app/node_modules/mime-db/HISTORY.md create mode 100644 app/node_modules/mime-db/LICENSE create mode 100644 app/node_modules/mime-db/README.md create mode 100644 app/node_modules/mime-db/db.json create mode 100644 app/node_modules/mime-db/index.js create mode 100644 app/node_modules/mime-db/package.json create mode 100644 app/node_modules/mime-types/HISTORY.md create mode 100644 app/node_modules/mime-types/LICENSE create mode 100644 app/node_modules/mime-types/README.md create mode 100644 app/node_modules/mime-types/index.js create mode 100644 app/node_modules/mime-types/package.json create mode 100644 app/node_modules/minimatch/LICENSE create mode 100644 app/node_modules/minimatch/README.md create mode 100644 app/node_modules/minimatch/minimatch.js create mode 100644 app/node_modules/minimatch/package.json create mode 100644 app/node_modules/minimist/.travis.yml create mode 100644 app/node_modules/minimist/LICENSE create mode 100644 app/node_modules/minimist/example/parse.js create mode 100644 app/node_modules/minimist/index.js create mode 100644 app/node_modules/minimist/package.json create mode 100644 app/node_modules/minimist/readme.markdown create mode 100644 app/node_modules/minimist/test/all_bool.js create mode 100644 app/node_modules/minimist/test/bool.js create mode 100644 app/node_modules/minimist/test/dash.js create mode 100644 app/node_modules/minimist/test/default_bool.js create mode 100644 app/node_modules/minimist/test/dotted.js create mode 100644 app/node_modules/minimist/test/kv_short.js create mode 100644 app/node_modules/minimist/test/long.js create mode 100644 app/node_modules/minimist/test/num.js create mode 100644 app/node_modules/minimist/test/parse.js create mode 100644 app/node_modules/minimist/test/parse_modified.js create mode 100644 app/node_modules/minimist/test/short.js create mode 100644 app/node_modules/minimist/test/stop_early.js create mode 100644 app/node_modules/minimist/test/unknown.js create mode 100644 app/node_modules/minimist/test/whitespace.js create mode 100644 app/node_modules/mkdirp/.npmignore create mode 100644 app/node_modules/mkdirp/.travis.yml create mode 100644 app/node_modules/mkdirp/LICENSE create mode 100755 app/node_modules/mkdirp/bin/cmd.js create mode 100644 app/node_modules/mkdirp/bin/usage.txt create mode 100644 app/node_modules/mkdirp/examples/pow.js create mode 100644 app/node_modules/mkdirp/index.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/.travis.yml create mode 100644 app/node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 app/node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 app/node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 app/node_modules/mkdirp/node_modules/minimist/test/whitespace.js create mode 100644 app/node_modules/mkdirp/package.json create mode 100644 app/node_modules/mkdirp/readme.markdown create mode 100644 app/node_modules/mkdirp/test/chmod.js create mode 100644 app/node_modules/mkdirp/test/clobber.js create mode 100644 app/node_modules/mkdirp/test/mkdirp.js create mode 100644 app/node_modules/mkdirp/test/opts_fs.js create mode 100644 app/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 app/node_modules/mkdirp/test/perm.js create mode 100644 app/node_modules/mkdirp/test/perm_sync.js create mode 100644 app/node_modules/mkdirp/test/race.js create mode 100644 app/node_modules/mkdirp/test/rel.js create mode 100644 app/node_modules/mkdirp/test/return.js create mode 100644 app/node_modules/mkdirp/test/return_sync.js create mode 100644 app/node_modules/mkdirp/test/root.js create mode 100644 app/node_modules/mkdirp/test/sync.js create mode 100644 app/node_modules/mkdirp/test/umask.js create mode 100644 app/node_modules/mkdirp/test/umask_sync.js create mode 100644 app/node_modules/ms/index.js create mode 100644 app/node_modules/ms/license.md create mode 100644 app/node_modules/ms/package.json create mode 100644 app/node_modules/ms/readme.md mode change 100644 => 100755 app/node_modules/nopt/bin/nopt.js mode change 100644 => 100755 app/node_modules/nopt/examples/my-program.js create mode 100644 app/node_modules/normalize-package-data/AUTHORS create mode 100644 app/node_modules/normalize-package-data/LICENSE create mode 100644 app/node_modules/normalize-package-data/README.md create mode 100644 app/node_modules/normalize-package-data/lib/extract_description.js create mode 100644 app/node_modules/normalize-package-data/lib/fixer.js create mode 100644 app/node_modules/normalize-package-data/lib/make_warning.js create mode 100644 app/node_modules/normalize-package-data/lib/normalize.js create mode 100644 app/node_modules/normalize-package-data/lib/safe_format.js create mode 100644 app/node_modules/normalize-package-data/lib/typos.json create mode 100644 app/node_modules/normalize-package-data/lib/warning_messages.json create mode 100644 app/node_modules/normalize-package-data/package.json create mode 100644 app/node_modules/nugget/.npmignore create mode 100644 app/node_modules/nugget/.travis.yml create mode 100755 app/node_modules/nugget/bin.js create mode 100644 app/node_modules/nugget/collaborators.md create mode 100644 app/node_modules/nugget/index.js create mode 100644 app/node_modules/nugget/multiple.png create mode 100644 app/node_modules/nugget/package.json create mode 100644 app/node_modules/nugget/readme.md create mode 100644 app/node_modules/nugget/test/cli.js create mode 100644 app/node_modules/nugget/test/resume.html create mode 100644 app/node_modules/nugget/test/resume.js create mode 100644 app/node_modules/nugget/test/test.js create mode 100644 app/node_modules/nugget/usage.txt create mode 100644 app/node_modules/number-is-nan/index.js create mode 100644 app/node_modules/number-is-nan/license create mode 100644 app/node_modules/number-is-nan/package.json create mode 100644 app/node_modules/number-is-nan/readme.md create mode 100644 app/node_modules/oauth-sign/LICENSE create mode 100644 app/node_modules/oauth-sign/README.md create mode 100644 app/node_modules/oauth-sign/index.js create mode 100644 app/node_modules/oauth-sign/package.json create mode 100644 app/node_modules/object-assign/index.js create mode 100644 app/node_modules/object-assign/license create mode 100644 app/node_modules/object-assign/package.json create mode 100644 app/node_modules/object-assign/readme.md create mode 100644 app/node_modules/object-keys/.npmignore create mode 100644 app/node_modules/object-keys/.travis.yml create mode 100644 app/node_modules/object-keys/README.md create mode 100644 app/node_modules/object-keys/foreach.js create mode 100644 app/node_modules/object-keys/index.js create mode 100644 app/node_modules/object-keys/isArguments.js create mode 100644 app/node_modules/object-keys/package.json create mode 100644 app/node_modules/object-keys/shim.js create mode 100644 app/node_modules/object-keys/test/foreach.js create mode 100644 app/node_modules/object-keys/test/index.js create mode 100644 app/node_modules/object-keys/test/isArguments.js create mode 100644 app/node_modules/object-keys/test/shim.js create mode 100644 app/node_modules/once/LICENSE create mode 100644 app/node_modules/once/README.md create mode 100644 app/node_modules/once/once.js create mode 100644 app/node_modules/once/package.json create mode 100644 app/node_modules/parse-json/index.js create mode 100644 app/node_modules/parse-json/license create mode 100644 app/node_modules/parse-json/package.json create mode 100644 app/node_modules/parse-json/readme.md create mode 100644 app/node_modules/parse-json/vendor/parse.js create mode 100644 app/node_modules/parse-json/vendor/unicode.js create mode 100644 app/node_modules/path-exists/index.js create mode 100644 app/node_modules/path-exists/license create mode 100644 app/node_modules/path-exists/package.json create mode 100644 app/node_modules/path-exists/readme.md create mode 100644 app/node_modules/path-is-absolute/index.js create mode 100644 app/node_modules/path-is-absolute/license create mode 100644 app/node_modules/path-is-absolute/package.json create mode 100644 app/node_modules/path-is-absolute/readme.md create mode 100644 app/node_modules/path-type/index.js create mode 100644 app/node_modules/path-type/license create mode 100644 app/node_modules/path-type/package.json create mode 100644 app/node_modules/path-type/readme.md create mode 100644 app/node_modules/pend/LICENSE create mode 100644 app/node_modules/pend/README.md create mode 100644 app/node_modules/pend/index.js create mode 100644 app/node_modules/pend/package.json create mode 100644 app/node_modules/pend/test.js create mode 100644 app/node_modules/performance-now/.npmignore create mode 100644 app/node_modules/performance-now/.tm_properties create mode 100644 app/node_modules/performance-now/.travis.yml create mode 100644 app/node_modules/performance-now/README.md create mode 100644 app/node_modules/performance-now/lib/performance-now.js create mode 100644 app/node_modules/performance-now/lib/performance-now.js.map create mode 100644 app/node_modules/performance-now/license.txt create mode 100644 app/node_modules/performance-now/package.json create mode 100644 app/node_modules/performance-now/src/index.d.ts create mode 100644 app/node_modules/performance-now/src/performance-now.coffee create mode 100644 app/node_modules/performance-now/test/mocha.opts create mode 100644 app/node_modules/performance-now/test/performance-now.coffee create mode 100644 app/node_modules/performance-now/test/scripts.coffee create mode 100755 app/node_modules/performance-now/test/scripts/delayed-call.coffee create mode 100755 app/node_modules/performance-now/test/scripts/delayed-require.coffee create mode 100755 app/node_modules/performance-now/test/scripts/difference.coffee create mode 100755 app/node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 app/node_modules/pify/index.js create mode 100644 app/node_modules/pify/license create mode 100644 app/node_modules/pify/package.json create mode 100644 app/node_modules/pify/readme.md create mode 100644 app/node_modules/pinkie-promise/index.js create mode 100644 app/node_modules/pinkie-promise/license create mode 100644 app/node_modules/pinkie-promise/package.json create mode 100644 app/node_modules/pinkie-promise/readme.md create mode 100644 app/node_modules/pinkie/index.js create mode 100644 app/node_modules/pinkie/license create mode 100644 app/node_modules/pinkie/package.json create mode 100644 app/node_modules/pinkie/readme.md create mode 100644 app/node_modules/pnotify/LICENSE create mode 100644 app/node_modules/pnotify/README.md create mode 100644 app/node_modules/pnotify/lib/es/PNotify.js create mode 100644 app/node_modules/pnotify/lib/es/PNotify.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyAnimate.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyAnimate.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyButtons.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyButtons.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyCallbacks.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyCallbacks.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyCompat.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyConfirm.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyConfirm.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyDesktop.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyDesktop.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyHistory.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyHistory.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyMobile.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyMobile.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyNonBlock.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyNonBlock.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyReference.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyReference.js.map create mode 100644 app/node_modules/pnotify/lib/es/PNotifyStyleMaterial.js create mode 100644 app/node_modules/pnotify/lib/es/PNotifyStyleMaterial.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotify.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotify.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyAnimate.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyAnimate.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyButtons.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyButtons.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyCallbacks.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyCallbacks.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyCompat.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyCompat.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyConfirm.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyConfirm.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyDesktop.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyDesktop.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyHistory.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyHistory.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyMobile.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyMobile.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyNonBlock.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyNonBlock.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyReference.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyReference.js.map create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyStyleMaterial.js create mode 100644 app/node_modules/pnotify/lib/iife/PNotifyStyleMaterial.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotify.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotify.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyAnimate.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyAnimate.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyButtons.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyButtons.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyCallbacks.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyCallbacks.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyCompat.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyCompat.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyConfirm.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyConfirm.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyDesktop.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyDesktop.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyHistory.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyHistory.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyMobile.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyMobile.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyNonBlock.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyNonBlock.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyReference.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyReference.js.map create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyStyleMaterial.js create mode 100644 app/node_modules/pnotify/lib/umd/PNotifyStyleMaterial.js.map create mode 100644 app/node_modules/pnotify/make.js create mode 100644 app/node_modules/pnotify/package.json create mode 100644 app/node_modules/pnotify/src/PNotify.html create mode 100644 app/node_modules/pnotify/src/PNotifyAnimate.html create mode 100644 app/node_modules/pnotify/src/PNotifyBrightTheme.css create mode 100644 app/node_modules/pnotify/src/PNotifyButtons.html create mode 100644 app/node_modules/pnotify/src/PNotifyCallbacks.html create mode 100644 app/node_modules/pnotify/src/PNotifyCompat.js create mode 100644 app/node_modules/pnotify/src/PNotifyConfirm.html create mode 100644 app/node_modules/pnotify/src/PNotifyDesktop.html create mode 100644 app/node_modules/pnotify/src/PNotifyHistory.html create mode 100644 app/node_modules/pnotify/src/PNotifyMobile.html create mode 100644 app/node_modules/pnotify/src/PNotifyNonBlock.html create mode 100644 app/node_modules/pnotify/src/PNotifyReference.html create mode 100644 app/node_modules/pnotify/src/PNotifyStyleMaterial.html create mode 100644 app/node_modules/popper.js/README.md create mode 100644 app/node_modules/popper.js/index.d.ts create mode 100644 app/node_modules/popper.js/package.json create mode 100755 app/node_modules/pretty-bytes/cli.js create mode 100644 app/node_modules/pretty-bytes/license create mode 100644 app/node_modules/pretty-bytes/package.json create mode 100644 app/node_modules/pretty-bytes/pretty-bytes.js create mode 100644 app/node_modules/pretty-bytes/readme.md create mode 100644 app/node_modules/process-nextick-args/index.js create mode 100644 app/node_modules/process-nextick-args/license.md create mode 100644 app/node_modules/process-nextick-args/package.json create mode 100644 app/node_modules/process-nextick-args/readme.md create mode 100644 app/node_modules/progress-stream/.npmignore create mode 100644 app/node_modules/progress-stream/LICENSE create mode 100644 app/node_modules/progress-stream/README.md create mode 100644 app/node_modules/progress-stream/index.js create mode 100644 app/node_modules/progress-stream/package.json create mode 100644 app/node_modules/progress-stream/test/http.js create mode 100644 app/node_modules/progress-stream/test/request.js create mode 100644 app/node_modules/punycode/LICENSE-MIT.txt create mode 100644 app/node_modules/punycode/README.md create mode 100644 app/node_modules/punycode/package.json create mode 100644 app/node_modules/punycode/punycode.js create mode 100644 app/node_modules/qs/.editorconfig create mode 100644 app/node_modules/qs/.eslintignore create mode 100644 app/node_modules/qs/.eslintrc create mode 100644 app/node_modules/qs/CHANGELOG.md create mode 100644 app/node_modules/qs/LICENSE create mode 100644 app/node_modules/qs/README.md create mode 100644 app/node_modules/qs/lib/formats.js create mode 100644 app/node_modules/qs/lib/index.js create mode 100644 app/node_modules/qs/lib/parse.js create mode 100644 app/node_modules/qs/lib/stringify.js create mode 100644 app/node_modules/qs/lib/utils.js create mode 100644 app/node_modules/qs/package.json create mode 100644 app/node_modules/qs/test/.eslintrc create mode 100644 app/node_modules/qs/test/index.js create mode 100644 app/node_modules/qs/test/parse.js create mode 100644 app/node_modules/qs/test/stringify.js create mode 100644 app/node_modules/qs/test/utils.js create mode 100644 app/node_modules/rc/LICENSE.APACHE2 create mode 100644 app/node_modules/rc/LICENSE.BSD create mode 100644 app/node_modules/rc/LICENSE.MIT create mode 100644 app/node_modules/rc/README.md create mode 100644 app/node_modules/rc/browser.js create mode 100755 app/node_modules/rc/cli.js create mode 100755 app/node_modules/rc/index.js create mode 100644 app/node_modules/rc/lib/utils.js create mode 100644 app/node_modules/rc/package.json create mode 100644 app/node_modules/rc/test/ini.js create mode 100644 app/node_modules/rc/test/nested-env-vars.js create mode 100644 app/node_modules/rc/test/test.js create mode 100644 app/node_modules/read-pkg-up/index.js create mode 100644 app/node_modules/read-pkg-up/license create mode 100644 app/node_modules/read-pkg-up/package.json create mode 100644 app/node_modules/read-pkg-up/readme.md create mode 100644 app/node_modules/read-pkg/index.js create mode 100644 app/node_modules/read-pkg/license create mode 100644 app/node_modules/read-pkg/package.json create mode 100644 app/node_modules/read-pkg/readme.md create mode 100644 app/node_modules/readable-stream/.npmignore create mode 100644 app/node_modules/readable-stream/LICENSE create mode 100644 app/node_modules/readable-stream/README.md create mode 100644 app/node_modules/readable-stream/duplex.js create mode 100644 app/node_modules/readable-stream/float.patch create mode 100644 app/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 app/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 app/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 app/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 app/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 app/node_modules/readable-stream/package.json create mode 100644 app/node_modules/readable-stream/passthrough.js create mode 100644 app/node_modules/readable-stream/readable.js create mode 100644 app/node_modules/readable-stream/transform.js create mode 100644 app/node_modules/readable-stream/writable.js create mode 100644 app/node_modules/redent/index.js create mode 100644 app/node_modules/redent/license create mode 100644 app/node_modules/redent/package.json create mode 100644 app/node_modules/redent/readme.md create mode 100644 app/node_modules/repeating/index.js create mode 100644 app/node_modules/repeating/license create mode 100644 app/node_modules/repeating/package.json create mode 100644 app/node_modules/repeating/readme.md create mode 100644 app/node_modules/request/CHANGELOG.md create mode 100644 app/node_modules/request/LICENSE create mode 100644 app/node_modules/request/README.md create mode 100755 app/node_modules/request/index.js create mode 100644 app/node_modules/request/lib/auth.js create mode 100644 app/node_modules/request/lib/cookies.js create mode 100644 app/node_modules/request/lib/getProxyFromURI.js create mode 100644 app/node_modules/request/lib/har.js create mode 100644 app/node_modules/request/lib/helpers.js create mode 100644 app/node_modules/request/lib/multipart.js create mode 100644 app/node_modules/request/lib/oauth.js create mode 100644 app/node_modules/request/lib/querystring.js create mode 100644 app/node_modules/request/lib/redirect.js create mode 100644 app/node_modules/request/lib/tunnel.js create mode 100644 app/node_modules/request/package.json create mode 100644 app/node_modules/request/request.js create mode 100644 app/node_modules/rimraf/LICENSE create mode 100644 app/node_modules/rimraf/README.md create mode 100755 app/node_modules/rimraf/bin.js create mode 100644 app/node_modules/rimraf/package.json create mode 100644 app/node_modules/rimraf/rimraf.js create mode 100644 app/node_modules/safe-buffer/LICENSE create mode 100644 app/node_modules/safe-buffer/README.md create mode 100644 app/node_modules/safe-buffer/index.d.ts create mode 100644 app/node_modules/safe-buffer/index.js create mode 100644 app/node_modules/safe-buffer/package.json create mode 100644 app/node_modules/semver/LICENSE create mode 100644 app/node_modules/semver/README.md create mode 100755 app/node_modules/semver/bin/semver create mode 100644 app/node_modules/semver/package.json create mode 100644 app/node_modules/semver/range.bnf create mode 100644 app/node_modules/semver/semver.js create mode 100644 app/node_modules/signal-exit/CHANGELOG.md create mode 100644 app/node_modules/signal-exit/LICENSE.txt create mode 100644 app/node_modules/signal-exit/README.md create mode 100644 app/node_modules/signal-exit/index.js create mode 100644 app/node_modules/signal-exit/package.json create mode 100644 app/node_modules/signal-exit/signals.js create mode 100644 app/node_modules/single-line-log/.npmignore create mode 100644 app/node_modules/single-line-log/LICENSE create mode 100644 app/node_modules/single-line-log/README.md create mode 100644 app/node_modules/single-line-log/index.js create mode 100644 app/node_modules/single-line-log/package.json create mode 100644 app/node_modules/single-line-log/test.js create mode 100755 app/node_modules/sntp/.npmignore create mode 100755 app/node_modules/sntp/LICENSE create mode 100755 app/node_modules/sntp/README.md create mode 100755 app/node_modules/sntp/lib/index.js create mode 100755 app/node_modules/sntp/package.json create mode 100644 app/node_modules/spdx-correct/LICENSE create mode 100644 app/node_modules/spdx-correct/README.md create mode 100644 app/node_modules/spdx-correct/index.js create mode 100644 app/node_modules/spdx-correct/package.json create mode 100644 app/node_modules/spdx-exceptions/README.md create mode 100644 app/node_modules/spdx-exceptions/index.json create mode 100644 app/node_modules/spdx-exceptions/package.json create mode 100644 app/node_modules/spdx-expression-parse/AUTHORS create mode 100644 app/node_modules/spdx-expression-parse/LICENSE create mode 100644 app/node_modules/spdx-expression-parse/README.md create mode 100644 app/node_modules/spdx-expression-parse/index.js create mode 100644 app/node_modules/spdx-expression-parse/package.json create mode 100644 app/node_modules/spdx-expression-parse/parse.js create mode 100644 app/node_modules/spdx-expression-parse/scan.js create mode 100644 app/node_modules/spdx-license-ids/README.md create mode 100644 app/node_modules/spdx-license-ids/deprecated.json create mode 100644 app/node_modules/spdx-license-ids/index.json create mode 100644 app/node_modules/spdx-license-ids/package.json create mode 100644 app/node_modules/speedometer/LICENSE create mode 100644 app/node_modules/speedometer/README.md create mode 100644 app/node_modules/speedometer/index.js create mode 100644 app/node_modules/speedometer/package.json create mode 100644 app/node_modules/sshpk/.npmignore create mode 100644 app/node_modules/sshpk/.travis.yml create mode 100644 app/node_modules/sshpk/LICENSE create mode 100644 app/node_modules/sshpk/README.md create mode 100755 app/node_modules/sshpk/bin/sshpk-conv create mode 100755 app/node_modules/sshpk/bin/sshpk-sign create mode 100755 app/node_modules/sshpk/bin/sshpk-verify create mode 100644 app/node_modules/sshpk/lib/algs.js create mode 100644 app/node_modules/sshpk/lib/certificate.js create mode 100644 app/node_modules/sshpk/lib/dhe.js create mode 100644 app/node_modules/sshpk/lib/ed-compat.js create mode 100644 app/node_modules/sshpk/lib/errors.js create mode 100644 app/node_modules/sshpk/lib/fingerprint.js create mode 100644 app/node_modules/sshpk/lib/formats/auto.js create mode 100644 app/node_modules/sshpk/lib/formats/dnssec.js create mode 100644 app/node_modules/sshpk/lib/formats/openssh-cert.js create mode 100644 app/node_modules/sshpk/lib/formats/pem.js create mode 100644 app/node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 app/node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 app/node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 app/node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 app/node_modules/sshpk/lib/formats/ssh.js create mode 100644 app/node_modules/sshpk/lib/formats/x509-pem.js create mode 100644 app/node_modules/sshpk/lib/formats/x509.js create mode 100644 app/node_modules/sshpk/lib/identity.js create mode 100644 app/node_modules/sshpk/lib/index.js create mode 100644 app/node_modules/sshpk/lib/key.js create mode 100644 app/node_modules/sshpk/lib/private-key.js create mode 100644 app/node_modules/sshpk/lib/signature.js create mode 100644 app/node_modules/sshpk/lib/ssh-buffer.js create mode 100644 app/node_modules/sshpk/lib/utils.js create mode 100644 app/node_modules/sshpk/man/man1/sshpk-conv.1 create mode 100644 app/node_modules/sshpk/man/man1/sshpk-sign.1 create mode 100644 app/node_modules/sshpk/man/man1/sshpk-verify.1 create mode 100644 app/node_modules/sshpk/package.json create mode 100644 app/node_modules/string-width/index.js create mode 100644 app/node_modules/string-width/license create mode 100644 app/node_modules/string-width/package.json create mode 100644 app/node_modules/string-width/readme.md create mode 100644 app/node_modules/string_decoder/.npmignore create mode 100644 app/node_modules/string_decoder/LICENSE create mode 100644 app/node_modules/string_decoder/README.md create mode 100644 app/node_modules/string_decoder/index.js create mode 100644 app/node_modules/string_decoder/package.json create mode 100644 app/node_modules/strip-ansi/index.js create mode 100644 app/node_modules/strip-ansi/license create mode 100644 app/node_modules/strip-ansi/package.json create mode 100644 app/node_modules/strip-ansi/readme.md create mode 100644 app/node_modules/strip-bom/index.js create mode 100644 app/node_modules/strip-bom/license create mode 100644 app/node_modules/strip-bom/package.json create mode 100644 app/node_modules/strip-bom/readme.md create mode 100755 app/node_modules/strip-indent/cli.js create mode 100644 app/node_modules/strip-indent/index.js create mode 100644 app/node_modules/strip-indent/license create mode 100644 app/node_modules/strip-indent/package.json create mode 100644 app/node_modules/strip-indent/readme.md create mode 100644 app/node_modules/strip-json-comments/index.js create mode 100644 app/node_modules/strip-json-comments/license create mode 100644 app/node_modules/strip-json-comments/package.json create mode 100644 app/node_modules/strip-json-comments/readme.md create mode 100644 app/node_modules/sumchecker/LICENSE create mode 100644 app/node_modules/sumchecker/NEWS.md create mode 100644 app/node_modules/sumchecker/README.md create mode 100644 app/node_modules/sumchecker/build.js create mode 100644 app/node_modules/sumchecker/package.json create mode 100644 app/node_modules/throttleit/.npmignore create mode 100644 app/node_modules/throttleit/History.md create mode 100644 app/node_modules/throttleit/Makefile create mode 100644 app/node_modules/throttleit/Readme.md create mode 100644 app/node_modules/throttleit/component.json create mode 100644 app/node_modules/throttleit/example.js create mode 100644 app/node_modules/throttleit/index.js create mode 100644 app/node_modules/throttleit/package.json create mode 100644 app/node_modules/through2/.jshintrc create mode 100644 app/node_modules/through2/.npmignore create mode 100644 app/node_modules/through2/.travis.yml create mode 100644 app/node_modules/through2/LICENSE create mode 100644 app/node_modules/through2/README.md create mode 100644 app/node_modules/through2/package.json create mode 100644 app/node_modules/through2/test.js create mode 100644 app/node_modules/through2/through2.js mode change 100644 => 100755 app/node_modules/tmp/cleanup.sh mode change 100644 => 120000 app/node_modules/touch/node_modules/.bin/nopt delete mode 100644 app/node_modules/touch/node_modules/.bin/nopt.cmd mode change 100644 => 100755 app/node_modules/touch/node_modules/nopt/bin/nopt.js mode change 100644 => 100755 app/node_modules/touch/node_modules/nopt/examples/my-program.js create mode 100644 app/node_modules/tough-cookie/LICENSE create mode 100644 app/node_modules/tough-cookie/README.md create mode 100644 app/node_modules/tough-cookie/lib/cookie.js create mode 100644 app/node_modules/tough-cookie/lib/memstore.js create mode 100644 app/node_modules/tough-cookie/lib/pathMatch.js create mode 100644 app/node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 app/node_modules/tough-cookie/lib/pubsuffix.js create mode 100644 app/node_modules/tough-cookie/lib/store.js create mode 100644 app/node_modules/tough-cookie/package.json mode change 100644 => 100755 app/node_modules/traverse/examples/json.js mode change 100644 => 100755 app/node_modules/traverse/examples/leaves.js mode change 100644 => 100755 app/node_modules/traverse/examples/negative.js mode change 100644 => 100755 app/node_modules/traverse/examples/stringify.js mode change 100644 => 100755 app/node_modules/traverse/index.js create mode 100644 app/node_modules/trim-newlines/index.js create mode 100644 app/node_modules/trim-newlines/license create mode 100644 app/node_modules/trim-newlines/package.json create mode 100644 app/node_modules/trim-newlines/readme.md create mode 100644 app/node_modules/tunnel-agent/LICENSE create mode 100644 app/node_modules/tunnel-agent/README.md create mode 100644 app/node_modules/tunnel-agent/index.js create mode 100644 app/node_modules/tunnel-agent/package.json create mode 100644 app/node_modules/tweetnacl/.npmignore create mode 100644 app/node_modules/tweetnacl/AUTHORS.md create mode 100644 app/node_modules/tweetnacl/CHANGELOG.md create mode 100644 app/node_modules/tweetnacl/LICENSE create mode 100644 app/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md create mode 100644 app/node_modules/tweetnacl/README.md create mode 100644 app/node_modules/tweetnacl/nacl-fast.js create mode 100644 app/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 app/node_modules/tweetnacl/nacl.d.ts create mode 100644 app/node_modules/tweetnacl/nacl.js create mode 100644 app/node_modules/tweetnacl/nacl.min.js create mode 100644 app/node_modules/tweetnacl/package.json create mode 100644 app/node_modules/typedarray/.travis.yml create mode 100644 app/node_modules/typedarray/LICENSE create mode 100644 app/node_modules/typedarray/example/tarray.js create mode 100644 app/node_modules/typedarray/index.js create mode 100644 app/node_modules/typedarray/package.json create mode 100644 app/node_modules/typedarray/readme.markdown create mode 100644 app/node_modules/typedarray/test/server/undef_globals.js create mode 100644 app/node_modules/typedarray/test/tarray.js create mode 100644 app/node_modules/util-deprecate/History.md create mode 100644 app/node_modules/util-deprecate/LICENSE create mode 100644 app/node_modules/util-deprecate/README.md create mode 100644 app/node_modules/util-deprecate/browser.js create mode 100644 app/node_modules/util-deprecate/node.js create mode 100644 app/node_modules/util-deprecate/package.json create mode 100644 app/node_modules/uuid/.eslintrc.json create mode 100644 app/node_modules/uuid/AUTHORS create mode 100644 app/node_modules/uuid/CHANGELOG.md create mode 100644 app/node_modules/uuid/LICENSE.md create mode 100644 app/node_modules/uuid/README.md create mode 100644 app/node_modules/uuid/README_js.md create mode 100755 app/node_modules/uuid/bin/uuid create mode 100644 app/node_modules/uuid/index.js create mode 100644 app/node_modules/uuid/lib/bytesToUuid.js create mode 100644 app/node_modules/uuid/lib/md5-browser.js create mode 100644 app/node_modules/uuid/lib/md5.js create mode 100644 app/node_modules/uuid/lib/rng-browser.js create mode 100644 app/node_modules/uuid/lib/rng.js create mode 100644 app/node_modules/uuid/lib/sha1-browser.js create mode 100644 app/node_modules/uuid/lib/sha1.js create mode 100644 app/node_modules/uuid/lib/v35.js create mode 100644 app/node_modules/uuid/package.json create mode 100644 app/node_modules/uuid/v1.js create mode 100644 app/node_modules/uuid/v3.js create mode 100644 app/node_modules/uuid/v4.js create mode 100644 app/node_modules/uuid/v5.js create mode 100644 app/node_modules/validate-npm-package-license/LICENSE create mode 100644 app/node_modules/validate-npm-package-license/README.md create mode 100644 app/node_modules/validate-npm-package-license/index.js create mode 100644 app/node_modules/validate-npm-package-license/package.json create mode 100644 app/node_modules/validate-npm-package-license/test.log create mode 100644 app/node_modules/verror/.npmignore create mode 100644 app/node_modules/verror/CHANGES.md create mode 100644 app/node_modules/verror/CONTRIBUTING.md create mode 100644 app/node_modules/verror/LICENSE create mode 100644 app/node_modules/verror/README.md create mode 100644 app/node_modules/verror/lib/verror.js create mode 100644 app/node_modules/verror/package.json create mode 100644 app/node_modules/wrappy/LICENSE create mode 100644 app/node_modules/wrappy/README.md create mode 100644 app/node_modules/wrappy/package.json create mode 100644 app/node_modules/wrappy/wrappy.js create mode 100644 app/node_modules/xtend/.npmignore create mode 100644 app/node_modules/xtend/LICENCE create mode 100644 app/node_modules/xtend/Makefile create mode 100644 app/node_modules/xtend/README.md create mode 100644 app/node_modules/xtend/has-keys.js create mode 100644 app/node_modules/xtend/index.js create mode 100644 app/node_modules/xtend/mutable.js create mode 100644 app/node_modules/xtend/package.json create mode 100644 app/node_modules/xtend/test.js create mode 100644 app/node_modules/yauzl/.npmignore create mode 100644 app/node_modules/yauzl/.travis.yml create mode 100644 app/node_modules/yauzl/LICENSE create mode 100644 app/node_modules/yauzl/README.md create mode 100644 app/node_modules/yauzl/index.js create mode 100644 app/node_modules/yauzl/package.json create mode 120000 node_modules/.bin/asar create mode 120000 node_modules/.bin/decompress-zip create mode 120000 node_modules/.bin/electron-download create mode 120000 node_modules/.bin/electron-osx-flat create mode 120000 node_modules/.bin/electron-osx-sign create mode 120000 node_modules/.bin/electron-packager create mode 120000 node_modules/.bin/extract-zip create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/nopt create mode 120000 node_modules/.bin/nugget create mode 120000 node_modules/.bin/pretty-bytes create mode 120000 node_modules/.bin/rc create mode 120000 node_modules/.bin/rimraf create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/sshpk-conv create mode 120000 node_modules/.bin/sshpk-sign create mode 120000 node_modules/.bin/sshpk-verify create mode 120000 node_modules/.bin/strip-indent create mode 120000 node_modules/.bin/uuid create mode 100644 node_modules/abbrev/LICENSE create mode 100644 node_modules/abbrev/README.md create mode 100644 node_modules/abbrev/abbrev.js create mode 100644 node_modules/abbrev/package.json create mode 100644 node_modules/ajv/.tonic_example.js create mode 100644 node_modules/ajv/LICENSE create mode 100644 node_modules/ajv/README.md create mode 100644 node_modules/ajv/lib/$data.js create mode 100644 node_modules/ajv/lib/ajv.d.ts create mode 100644 node_modules/ajv/lib/ajv.js create mode 100644 node_modules/ajv/lib/cache.js create mode 100644 node_modules/ajv/lib/compile/_rules.js create mode 100644 node_modules/ajv/lib/compile/async.js create mode 100644 node_modules/ajv/lib/compile/equal.js create mode 100644 node_modules/ajv/lib/compile/error_classes.js create mode 100644 node_modules/ajv/lib/compile/formats.js create mode 100644 node_modules/ajv/lib/compile/index.js create mode 100644 node_modules/ajv/lib/compile/resolve.js create mode 100644 node_modules/ajv/lib/compile/rules.js create mode 100644 node_modules/ajv/lib/compile/schema_obj.js create mode 100644 node_modules/ajv/lib/compile/ucs2length.js create mode 100644 node_modules/ajv/lib/compile/util.js create mode 100644 node_modules/ajv/lib/dot/_limit.jst create mode 100644 node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 node_modules/ajv/lib/dot/allOf.jst create mode 100644 node_modules/ajv/lib/dot/anyOf.jst create mode 100644 node_modules/ajv/lib/dot/coerce.def create mode 100644 node_modules/ajv/lib/dot/const.jst create mode 100644 node_modules/ajv/lib/dot/contains.jst create mode 100644 node_modules/ajv/lib/dot/custom.jst create mode 100644 node_modules/ajv/lib/dot/defaults.def create mode 100644 node_modules/ajv/lib/dot/definitions.def create mode 100644 node_modules/ajv/lib/dot/dependencies.jst create mode 100644 node_modules/ajv/lib/dot/enum.jst create mode 100644 node_modules/ajv/lib/dot/errors.def create mode 100644 node_modules/ajv/lib/dot/format.jst create mode 100644 node_modules/ajv/lib/dot/items.jst create mode 100644 node_modules/ajv/lib/dot/missing.def create mode 100644 node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 node_modules/ajv/lib/dot/not.jst create mode 100644 node_modules/ajv/lib/dot/oneOf.jst create mode 100644 node_modules/ajv/lib/dot/pattern.jst create mode 100644 node_modules/ajv/lib/dot/properties.jst create mode 100644 node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 node_modules/ajv/lib/dot/ref.jst create mode 100644 node_modules/ajv/lib/dot/required.jst create mode 100644 node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 node_modules/ajv/lib/dot/validate.jst create mode 100644 node_modules/ajv/lib/dotjs/README.md create mode 100644 node_modules/ajv/lib/dotjs/_limit.js create mode 100644 node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 node_modules/ajv/lib/dotjs/allOf.js create mode 100644 node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 node_modules/ajv/lib/dotjs/const.js create mode 100644 node_modules/ajv/lib/dotjs/contains.js create mode 100644 node_modules/ajv/lib/dotjs/custom.js create mode 100644 node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 node_modules/ajv/lib/dotjs/enum.js create mode 100644 node_modules/ajv/lib/dotjs/format.js create mode 100644 node_modules/ajv/lib/dotjs/items.js create mode 100644 node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 node_modules/ajv/lib/dotjs/not.js create mode 100644 node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 node_modules/ajv/lib/dotjs/pattern.js create mode 100644 node_modules/ajv/lib/dotjs/properties.js create mode 100644 node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 node_modules/ajv/lib/dotjs/ref.js create mode 100644 node_modules/ajv/lib/dotjs/required.js create mode 100644 node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 node_modules/ajv/lib/dotjs/validate.js create mode 100644 node_modules/ajv/lib/keyword.js create mode 100644 node_modules/ajv/lib/patternGroups.js create mode 100644 node_modules/ajv/lib/refs/$data.json create mode 100644 node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 node_modules/ajv/package.json create mode 100644 node_modules/ajv/scripts/.eslintrc.yml create mode 100644 node_modules/ajv/scripts/bundle.js create mode 100644 node_modules/ajv/scripts/compile-dots.js create mode 100755 node_modules/ajv/scripts/info create mode 100755 node_modules/ajv/scripts/prepare-tests create mode 100755 node_modules/ajv/scripts/travis-gh-pages create mode 100644 node_modules/ansi-regex/index.js create mode 100644 node_modules/ansi-regex/license create mode 100644 node_modules/ansi-regex/package.json create mode 100644 node_modules/ansi-regex/readme.md create mode 100644 node_modules/array-find-index/index.js create mode 100644 node_modules/array-find-index/license create mode 100644 node_modules/array-find-index/package.json create mode 100644 node_modules/array-find-index/readme.md create mode 100644 node_modules/asar/CHANGELOG.md create mode 100644 node_modules/asar/LICENSE.md create mode 100644 node_modules/asar/README.md create mode 100755 node_modules/asar/bin/asar.js create mode 100644 node_modules/asar/lib/asar.js create mode 100644 node_modules/asar/lib/crawlfs.js create mode 100644 node_modules/asar/lib/disk.js create mode 100644 node_modules/asar/lib/filesystem.js create mode 100644 node_modules/asar/lib/snapshot.js create mode 100644 node_modules/asar/package.json create mode 100644 node_modules/asar/snapcraft.yaml create mode 100644 node_modules/asn1/.npmignore create mode 100644 node_modules/asn1/.travis.yml create mode 100644 node_modules/asn1/LICENSE create mode 100644 node_modules/asn1/README.md create mode 100644 node_modules/asn1/lib/ber/errors.js create mode 100644 node_modules/asn1/lib/ber/index.js create mode 100644 node_modules/asn1/lib/ber/reader.js create mode 100644 node_modules/asn1/lib/ber/types.js create mode 100644 node_modules/asn1/lib/ber/writer.js create mode 100644 node_modules/asn1/lib/index.js create mode 100644 node_modules/asn1/package.json create mode 100644 node_modules/asn1/tst/ber/reader.test.js create mode 100644 node_modules/asn1/tst/ber/writer.test.js create mode 100644 node_modules/assert-plus/AUTHORS create mode 100644 node_modules/assert-plus/CHANGES.md create mode 100644 node_modules/assert-plus/README.md create mode 100644 node_modules/assert-plus/assert.js create mode 100644 node_modules/assert-plus/package.json create mode 100644 node_modules/asynckit/LICENSE create mode 100644 node_modules/asynckit/README.md create mode 100644 node_modules/asynckit/bench.js create mode 100644 node_modules/asynckit/index.js create mode 100644 node_modules/asynckit/lib/abort.js create mode 100644 node_modules/asynckit/lib/async.js create mode 100644 node_modules/asynckit/lib/defer.js create mode 100644 node_modules/asynckit/lib/iterate.js create mode 100644 node_modules/asynckit/lib/readable_asynckit.js create mode 100644 node_modules/asynckit/lib/readable_parallel.js create mode 100644 node_modules/asynckit/lib/readable_serial.js create mode 100644 node_modules/asynckit/lib/readable_serial_ordered.js create mode 100644 node_modules/asynckit/lib/state.js create mode 100644 node_modules/asynckit/lib/streamify.js create mode 100644 node_modules/asynckit/lib/terminator.js create mode 100644 node_modules/asynckit/package.json create mode 100644 node_modules/asynckit/parallel.js create mode 100644 node_modules/asynckit/serial.js create mode 100644 node_modules/asynckit/serialOrdered.js create mode 100644 node_modules/asynckit/stream.js create mode 100644 node_modules/author-regex/LICENSE create mode 100644 node_modules/author-regex/README.md create mode 100644 node_modules/author-regex/index.js create mode 100644 node_modules/author-regex/package.json create mode 100644 node_modules/aws-sign2/LICENSE create mode 100644 node_modules/aws-sign2/README.md create mode 100644 node_modules/aws-sign2/index.js create mode 100644 node_modules/aws-sign2/package.json create mode 100644 node_modules/aws4/.travis.yml create mode 100644 node_modules/aws4/LICENSE create mode 100644 node_modules/aws4/README.md create mode 100644 node_modules/aws4/aws4.js create mode 100644 node_modules/aws4/lru.js create mode 100644 node_modules/aws4/package.json create mode 100644 node_modules/balanced-match/.npmignore create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/package.json create mode 100644 node_modules/base64-js/LICENSE create mode 100644 node_modules/base64-js/README.md create mode 100644 node_modules/base64-js/base64js.min.js create mode 100644 node_modules/base64-js/index.js create mode 100644 node_modules/base64-js/package.json create mode 100644 node_modules/base64-js/test/big-data.js create mode 100644 node_modules/base64-js/test/convert.js create mode 100644 node_modules/base64-js/test/url-safe.js create mode 100644 node_modules/bcrypt-pbkdf/README.md create mode 100644 node_modules/bcrypt-pbkdf/index.js create mode 100644 node_modules/bcrypt-pbkdf/package.json create mode 100644 node_modules/binary/.npmignore create mode 100644 node_modules/binary/.travis.yml create mode 100644 node_modules/binary/README.markdown create mode 100644 node_modules/binary/example/buf.js create mode 100644 node_modules/binary/example/parse.js create mode 100644 node_modules/binary/example/stream.js create mode 100644 node_modules/binary/index.js create mode 100644 node_modules/binary/lib/vars.js create mode 100644 node_modules/binary/package.json create mode 100644 node_modules/binary/perf/loop.js create mode 100644 node_modules/binary/perf/small.js create mode 100644 node_modules/binary/test/bu.js create mode 100644 node_modules/binary/test/deferred.js create mode 100644 node_modules/binary/test/dots.js create mode 100644 node_modules/binary/test/eof.js create mode 100644 node_modules/binary/test/flush.js create mode 100644 node_modules/binary/test/from_buffer.js create mode 100644 node_modules/binary/test/get_buffer.js create mode 100644 node_modules/binary/test/immediate.js create mode 100644 node_modules/binary/test/interval.js create mode 100644 node_modules/binary/test/into_buffer.js create mode 100644 node_modules/binary/test/into_stream.js create mode 100644 node_modules/binary/test/loop.js create mode 100644 node_modules/binary/test/loop_scan.js create mode 100644 node_modules/binary/test/lu.js create mode 100644 node_modules/binary/test/negbs.js create mode 100644 node_modules/binary/test/negls.js create mode 100644 node_modules/binary/test/nested.js create mode 100644 node_modules/binary/test/not_enough_buf.js create mode 100644 node_modules/binary/test/not_enough_parse.js create mode 100644 node_modules/binary/test/parse.js create mode 100644 node_modules/binary/test/peek.js create mode 100644 node_modules/binary/test/pipe.js create mode 100644 node_modules/binary/test/posbs.js create mode 100644 node_modules/binary/test/posls.js create mode 100644 node_modules/binary/test/scan.js create mode 100644 node_modules/binary/test/scan_buf.js create mode 100644 node_modules/binary/test/scan_buf_null.js create mode 100644 node_modules/binary/test/skip.js create mode 100644 node_modules/binary/test/split.js create mode 100644 node_modules/bluebird/LICENSE create mode 100644 node_modules/bluebird/README.md create mode 100644 node_modules/bluebird/changelog.md create mode 100644 node_modules/bluebird/js/browser/bluebird.core.js create mode 100644 node_modules/bluebird/js/browser/bluebird.core.min.js create mode 100644 node_modules/bluebird/js/browser/bluebird.js create mode 100644 node_modules/bluebird/js/browser/bluebird.min.js create mode 100644 node_modules/bluebird/js/release/any.js create mode 100644 node_modules/bluebird/js/release/assert.js create mode 100644 node_modules/bluebird/js/release/async.js create mode 100644 node_modules/bluebird/js/release/bind.js create mode 100644 node_modules/bluebird/js/release/bluebird.js create mode 100644 node_modules/bluebird/js/release/call_get.js create mode 100644 node_modules/bluebird/js/release/cancel.js create mode 100644 node_modules/bluebird/js/release/catch_filter.js create mode 100644 node_modules/bluebird/js/release/context.js create mode 100644 node_modules/bluebird/js/release/debuggability.js create mode 100644 node_modules/bluebird/js/release/direct_resolve.js create mode 100644 node_modules/bluebird/js/release/each.js create mode 100644 node_modules/bluebird/js/release/errors.js create mode 100644 node_modules/bluebird/js/release/es5.js create mode 100644 node_modules/bluebird/js/release/filter.js create mode 100644 node_modules/bluebird/js/release/finally.js create mode 100644 node_modules/bluebird/js/release/generators.js create mode 100644 node_modules/bluebird/js/release/join.js create mode 100644 node_modules/bluebird/js/release/map.js create mode 100644 node_modules/bluebird/js/release/method.js create mode 100644 node_modules/bluebird/js/release/nodeback.js create mode 100644 node_modules/bluebird/js/release/nodeify.js create mode 100644 node_modules/bluebird/js/release/promise.js create mode 100644 node_modules/bluebird/js/release/promise_array.js create mode 100644 node_modules/bluebird/js/release/promisify.js create mode 100644 node_modules/bluebird/js/release/props.js create mode 100644 node_modules/bluebird/js/release/queue.js create mode 100644 node_modules/bluebird/js/release/race.js create mode 100644 node_modules/bluebird/js/release/reduce.js create mode 100644 node_modules/bluebird/js/release/schedule.js create mode 100644 node_modules/bluebird/js/release/settle.js create mode 100644 node_modules/bluebird/js/release/some.js create mode 100644 node_modules/bluebird/js/release/synchronous_inspection.js create mode 100644 node_modules/bluebird/js/release/thenables.js create mode 100644 node_modules/bluebird/js/release/timers.js create mode 100644 node_modules/bluebird/js/release/using.js create mode 100644 node_modules/bluebird/js/release/util.js create mode 100644 node_modules/bluebird/package.json create mode 100755 node_modules/boom/LICENSE create mode 100755 node_modules/boom/README.md create mode 100755 node_modules/boom/lib/index.js create mode 100644 node_modules/boom/package.json create mode 100644 node_modules/brace-expansion/LICENSE create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/buffers/README.markdown create mode 100644 node_modules/buffers/examples/slice.js create mode 100644 node_modules/buffers/examples/splice.js create mode 100644 node_modules/buffers/index.js create mode 100644 node_modules/buffers/package.json create mode 100644 node_modules/buffers/test/buffers.js create mode 100644 node_modules/builtin-modules/builtin-modules.json create mode 100644 node_modules/builtin-modules/index.js create mode 100644 node_modules/builtin-modules/license create mode 100644 node_modules/builtin-modules/package.json create mode 100644 node_modules/builtin-modules/readme.md create mode 100644 node_modules/builtin-modules/static.js create mode 100644 node_modules/camelcase-keys/index.js create mode 100644 node_modules/camelcase-keys/license create mode 100644 node_modules/camelcase-keys/package.json create mode 100644 node_modules/camelcase-keys/readme.md create mode 100644 node_modules/camelcase/index.js create mode 100644 node_modules/camelcase/license create mode 100644 node_modules/camelcase/package.json create mode 100644 node_modules/camelcase/readme.md create mode 100644 node_modules/caseless/LICENSE create mode 100644 node_modules/caseless/README.md create mode 100644 node_modules/caseless/index.js create mode 100644 node_modules/caseless/package.json create mode 100644 node_modules/caseless/test.js create mode 100644 node_modules/chainsaw/.npmignore create mode 100644 node_modules/chainsaw/README.markdown create mode 100644 node_modules/chainsaw/examples/add_do.js create mode 100644 node_modules/chainsaw/examples/prompt.js create mode 100755 node_modules/chainsaw/index.js create mode 100644 node_modules/chainsaw/package.json create mode 100644 node_modules/chainsaw/test/chainsaw.js create mode 100644 node_modules/chromium-pickle-js/README.md create mode 100644 node_modules/chromium-pickle-js/lib/exports.js create mode 100644 node_modules/chromium-pickle-js/lib/pickle.js create mode 100644 node_modules/chromium-pickle-js/package.json create mode 100644 node_modules/co/History.md create mode 100644 node_modules/co/LICENSE create mode 100644 node_modules/co/Readme.md create mode 100644 node_modules/co/index.js create mode 100644 node_modules/co/package.json create mode 100644 node_modules/code-point-at/index.js create mode 100644 node_modules/code-point-at/license create mode 100644 node_modules/code-point-at/package.json create mode 100644 node_modules/code-point-at/readme.md create mode 100644 node_modules/combined-stream/License create mode 100644 node_modules/combined-stream/Readme.md create mode 100644 node_modules/combined-stream/lib/combined_stream.js create mode 100644 node_modules/combined-stream/lib/defer.js create mode 100644 node_modules/combined-stream/package.json create mode 100644 node_modules/commander/CHANGELOG.md create mode 100644 node_modules/commander/LICENSE create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/commander/typings/index.d.ts create mode 100644 node_modules/compare-version/README.md create mode 100644 node_modules/compare-version/index.js create mode 100644 node_modules/compare-version/package.json create mode 100644 node_modules/concat-map/.travis.yml create mode 100644 node_modules/concat-map/LICENSE create mode 100644 node_modules/concat-map/README.markdown create mode 100644 node_modules/concat-map/example/map.js create mode 100644 node_modules/concat-map/index.js create mode 100644 node_modules/concat-map/package.json create mode 100644 node_modules/concat-map/test/map.js create mode 100644 node_modules/concat-stream/LICENSE create mode 100644 node_modules/concat-stream/index.js create mode 100644 node_modules/concat-stream/node_modules/isarray/.npmignore create mode 100644 node_modules/concat-stream/node_modules/isarray/.travis.yml create mode 100644 node_modules/concat-stream/node_modules/isarray/Makefile create mode 100644 node_modules/concat-stream/node_modules/isarray/README.md create mode 100644 node_modules/concat-stream/node_modules/isarray/component.json create mode 100644 node_modules/concat-stream/node_modules/isarray/index.js create mode 100644 node_modules/concat-stream/node_modules/isarray/package.json create mode 100644 node_modules/concat-stream/node_modules/isarray/test.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/.travis.yml create mode 100644 node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md create mode 100644 node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/readable-browser.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/writable-browser.js create mode 100644 node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 node_modules/concat-stream/node_modules/string_decoder/.travis.yml create mode 100644 node_modules/concat-stream/node_modules/string_decoder/LICENSE create mode 100644 node_modules/concat-stream/node_modules/string_decoder/README.md create mode 100644 node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js create mode 100644 node_modules/concat-stream/node_modules/string_decoder/package.json create mode 100644 node_modules/concat-stream/package.json create mode 100644 node_modules/concat-stream/readme.md create mode 100644 node_modules/core-util-is/LICENSE create mode 100644 node_modules/core-util-is/README.md create mode 100644 node_modules/core-util-is/float.patch create mode 100644 node_modules/core-util-is/lib/util.js create mode 100644 node_modules/core-util-is/package.json create mode 100644 node_modules/core-util-is/test.js create mode 100644 node_modules/cryptiles/.npmignore create mode 100755 node_modules/cryptiles/LICENSE create mode 100755 node_modules/cryptiles/README.md create mode 100755 node_modules/cryptiles/lib/index.js create mode 100755 node_modules/cryptiles/node_modules/boom/LICENSE create mode 100755 node_modules/cryptiles/node_modules/boom/README.md create mode 100755 node_modules/cryptiles/node_modules/boom/lib/index.js create mode 100644 node_modules/cryptiles/node_modules/boom/package.json create mode 100755 node_modules/cryptiles/package.json create mode 100644 node_modules/cuint/.npmignore create mode 100644 node_modules/cuint/History.md create mode 100644 node_modules/cuint/README.md create mode 100644 node_modules/cuint/build.js create mode 100644 node_modules/cuint/build/uint32.js create mode 100644 node_modules/cuint/build/uint32.min.js create mode 100644 node_modules/cuint/build/uint64.js create mode 100644 node_modules/cuint/build/uint64.min.js create mode 100644 node_modules/cuint/examples/adding.js create mode 100644 node_modules/cuint/examples/dividing.js create mode 100644 node_modules/cuint/examples/uint32.html create mode 100644 node_modules/cuint/index.js create mode 100644 node_modules/cuint/lib/uint32.js create mode 100644 node_modules/cuint/lib/uint64.js create mode 100644 node_modules/cuint/package.json create mode 100644 node_modules/cuint/test/UINT32-test.js create mode 100644 node_modules/cuint/test/UINT32_add-test.js create mode 100644 node_modules/cuint/test/UINT32_and-test.js create mode 100644 node_modules/cuint/test/UINT32_div-test.js create mode 100644 node_modules/cuint/test/UINT32_equals-test.js create mode 100644 node_modules/cuint/test/UINT32_greaterThan-test.js create mode 100644 node_modules/cuint/test/UINT32_lessThan-test.js create mode 100644 node_modules/cuint/test/UINT32_multiply-test.js create mode 100644 node_modules/cuint/test/UINT32_negate-test.js create mode 100644 node_modules/cuint/test/UINT32_not-test.js create mode 100644 node_modules/cuint/test/UINT32_or-test.js create mode 100644 node_modules/cuint/test/UINT32_rotateLeft-test.js create mode 100644 node_modules/cuint/test/UINT32_rotateRight-test.js create mode 100644 node_modules/cuint/test/UINT32_shiftLeft-test.js create mode 100644 node_modules/cuint/test/UINT32_shiftRight-test.js create mode 100644 node_modules/cuint/test/UINT32_subtract-test.js create mode 100644 node_modules/cuint/test/UINT32_toNumber-test.js create mode 100644 node_modules/cuint/test/UINT32_toString-test.js create mode 100644 node_modules/cuint/test/UINT32_xor-test.js create mode 100644 node_modules/cuint/test/UINT64-test.js create mode 100644 node_modules/cuint/test/UINT64_add-test.js create mode 100644 node_modules/cuint/test/UINT64_and-test.js create mode 100644 node_modules/cuint/test/UINT64_div-test.js create mode 100644 node_modules/cuint/test/UINT64_equals-test.js create mode 100644 node_modules/cuint/test/UINT64_greaterThan-test.js create mode 100644 node_modules/cuint/test/UINT64_lessThan-test.js create mode 100644 node_modules/cuint/test/UINT64_multiply-test.js create mode 100644 node_modules/cuint/test/UINT64_negate-test.js create mode 100644 node_modules/cuint/test/UINT64_not-test.js create mode 100644 node_modules/cuint/test/UINT64_or-test.js create mode 100644 node_modules/cuint/test/UINT64_rotateLeft-test.js create mode 100644 node_modules/cuint/test/UINT64_rotateRight-test.js create mode 100644 node_modules/cuint/test/UINT64_shiftLeft-test.js create mode 100644 node_modules/cuint/test/UINT64_shiftRight-test.js create mode 100644 node_modules/cuint/test/UINT64_subtract-test.js create mode 100644 node_modules/cuint/test/UINT64_toNumber-test.js create mode 100644 node_modules/cuint/test/UINT64_toString-test.js create mode 100644 node_modules/cuint/test/UINT64_xor-test.js create mode 100644 node_modules/currently-unhandled/browser.js create mode 100644 node_modules/currently-unhandled/core.js create mode 100644 node_modules/currently-unhandled/index.js create mode 100644 node_modules/currently-unhandled/license create mode 100644 node_modules/currently-unhandled/package.json create mode 100644 node_modules/currently-unhandled/readme.md create mode 100644 node_modules/dashdash/CHANGES.md create mode 100644 node_modules/dashdash/LICENSE.txt create mode 100644 node_modules/dashdash/README.md create mode 100644 node_modules/dashdash/etc/dashdash.bash_completion.in create mode 100644 node_modules/dashdash/lib/dashdash.js create mode 100644 node_modules/dashdash/package.json create mode 100644 node_modules/debug/.coveralls.yml create mode 100644 node_modules/debug/.eslintrc create mode 100644 node_modules/debug/.npmignore create mode 100644 node_modules/debug/.travis.yml create mode 100644 node_modules/debug/CHANGELOG.md create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/Makefile create mode 100644 node_modules/debug/README.md create mode 100644 node_modules/debug/karma.conf.js create mode 100644 node_modules/debug/node.js create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/debug/src/browser.js create mode 100644 node_modules/debug/src/debug.js create mode 100644 node_modules/debug/src/index.js create mode 100644 node_modules/debug/src/node.js create mode 100644 node_modules/decamelize/index.js create mode 100644 node_modules/decamelize/license create mode 100644 node_modules/decamelize/package.json create mode 100644 node_modules/decamelize/readme.md create mode 100644 node_modules/decompress-zip/README.md create mode 100755 node_modules/decompress-zip/bin/decompress-zip create mode 100644 node_modules/decompress-zip/changelog.md create mode 100644 node_modules/decompress-zip/lib/decompress-zip.js create mode 100644 node_modules/decompress-zip/lib/extractors.js create mode 100644 node_modules/decompress-zip/lib/file-details.js create mode 100644 node_modules/decompress-zip/lib/signatures.js create mode 100644 node_modules/decompress-zip/lib/structures.js create mode 100644 node_modules/decompress-zip/package.json create mode 100644 node_modules/deep-extend/CHANGELOG.md create mode 100644 node_modules/deep-extend/LICENSE create mode 100644 node_modules/deep-extend/README.md create mode 100644 node_modules/deep-extend/index.js create mode 100644 node_modules/deep-extend/lib/deep-extend.js create mode 100644 node_modules/deep-extend/package.json create mode 100644 node_modules/delayed-stream/.npmignore create mode 100644 node_modules/delayed-stream/License create mode 100644 node_modules/delayed-stream/Makefile create mode 100644 node_modules/delayed-stream/Readme.md create mode 100644 node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 node_modules/delayed-stream/package.json create mode 100644 node_modules/ecc-jsbn/.npmignore create mode 100644 node_modules/ecc-jsbn/LICENSE create mode 100644 node_modules/ecc-jsbn/README.md create mode 100644 node_modules/ecc-jsbn/index.js create mode 100644 node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100644 node_modules/ecc-jsbn/lib/ec.js create mode 100644 node_modules/ecc-jsbn/lib/sec.js create mode 100644 node_modules/ecc-jsbn/package.json create mode 100644 node_modules/ecc-jsbn/test.js create mode 100644 node_modules/electron-download/collaborators.md create mode 100755 node_modules/electron-download/lib/cli.js create mode 100644 node_modules/electron-download/lib/index.js create mode 100644 node_modules/electron-download/node_modules/debug/.coveralls.yml create mode 100644 node_modules/electron-download/node_modules/debug/.eslintrc create mode 100644 node_modules/electron-download/node_modules/debug/.npmignore create mode 100644 node_modules/electron-download/node_modules/debug/.travis.yml create mode 100644 node_modules/electron-download/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/electron-download/node_modules/debug/LICENSE create mode 100644 node_modules/electron-download/node_modules/debug/Makefile create mode 100644 node_modules/electron-download/node_modules/debug/README.md create mode 100644 node_modules/electron-download/node_modules/debug/component.json create mode 100644 node_modules/electron-download/node_modules/debug/karma.conf.js create mode 100644 node_modules/electron-download/node_modules/debug/node.js create mode 100644 node_modules/electron-download/node_modules/debug/package.json create mode 100644 node_modules/electron-download/node_modules/debug/src/browser.js create mode 100644 node_modules/electron-download/node_modules/debug/src/debug.js create mode 100644 node_modules/electron-download/node_modules/debug/src/index.js create mode 100644 node_modules/electron-download/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/electron-download/node_modules/debug/src/node.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/.npmignore create mode 100644 node_modules/electron-download/node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/LICENSE create mode 100644 node_modules/electron-download/node_modules/fs-extra/README.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/move.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/copy/ncp.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/electron-download/node_modules/fs-extra/package.json create mode 100644 node_modules/electron-download/node_modules/minimist/.travis.yml create mode 100644 node_modules/electron-download/node_modules/minimist/LICENSE create mode 100644 node_modules/electron-download/node_modules/minimist/example/parse.js create mode 100644 node_modules/electron-download/node_modules/minimist/index.js create mode 100644 node_modules/electron-download/node_modules/minimist/package.json create mode 100644 node_modules/electron-download/node_modules/minimist/readme.markdown create mode 100644 node_modules/electron-download/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/bool.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/dash.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/dotted.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/long.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/num.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/parse.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/short.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/unknown.js create mode 100644 node_modules/electron-download/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/electron-download/package.json create mode 100644 node_modules/electron-download/readme.md create mode 100644 node_modules/electron-osx-sign/.eslintrc.json create mode 100644 node_modules/electron-osx-sign/.gitattributes create mode 100644 node_modules/electron-osx-sign/.npmignore create mode 100644 node_modules/electron-osx-sign/.travis.yml create mode 100644 node_modules/electron-osx-sign/LICENSE create mode 100644 node_modules/electron-osx-sign/README.md create mode 100644 node_modules/electron-osx-sign/bin/electron-osx-flat-usage.txt create mode 100755 node_modules/electron-osx-sign/bin/electron-osx-flat.js create mode 100644 node_modules/electron-osx-sign/bin/electron-osx-sign-usage.txt create mode 100755 node_modules/electron-osx-sign/bin/electron-osx-sign.js create mode 100644 node_modules/electron-osx-sign/default.entitlements.darwin.inherit.plist create mode 100644 node_modules/electron-osx-sign/default.entitlements.darwin.plist create mode 100755 node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist create mode 100755 node_modules/electron-osx-sign/default.entitlements.mas.plist create mode 100644 node_modules/electron-osx-sign/flat.js create mode 100644 node_modules/electron-osx-sign/index.d.ts create mode 100644 node_modules/electron-osx-sign/index.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/.coveralls.yml create mode 100644 node_modules/electron-osx-sign/node_modules/debug/.eslintrc create mode 100644 node_modules/electron-osx-sign/node_modules/debug/.npmignore create mode 100644 node_modules/electron-osx-sign/node_modules/debug/.travis.yml create mode 100644 node_modules/electron-osx-sign/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/electron-osx-sign/node_modules/debug/LICENSE create mode 100644 node_modules/electron-osx-sign/node_modules/debug/Makefile create mode 100644 node_modules/electron-osx-sign/node_modules/debug/README.md create mode 100644 node_modules/electron-osx-sign/node_modules/debug/component.json create mode 100644 node_modules/electron-osx-sign/node_modules/debug/karma.conf.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/node.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/package.json create mode 100644 node_modules/electron-osx-sign/node_modules/debug/src/browser.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/src/debug.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/src/index.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/electron-osx-sign/node_modules/debug/src/node.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/.travis.yml create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/LICENSE create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/example/parse.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/index.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/package.json create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/readme.markdown create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/bool.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/dash.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/dotted.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/long.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/num.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/parse.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/short.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/unknown.js create mode 100644 node_modules/electron-osx-sign/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/electron-osx-sign/package.json create mode 100644 node_modules/electron-osx-sign/sign.js create mode 100644 node_modules/electron-osx-sign/test/basic.js create mode 100644 node_modules/electron-osx-sign/test/config.json create mode 100644 node_modules/electron-osx-sign/test/index.js create mode 100644 node_modules/electron-osx-sign/test/util.js create mode 100644 node_modules/electron-osx-sign/util-entitlements.js create mode 100644 node_modules/electron-osx-sign/util-identities.js create mode 100644 node_modules/electron-osx-sign/util-provisioning-profiles.js create mode 100644 node_modules/electron-osx-sign/util.js create mode 100644 node_modules/electron-packager/.eslintignore create mode 100644 node_modules/electron-packager/.github/config.yml create mode 100644 node_modules/electron-packager/.github/issue_template.md create mode 100644 node_modules/electron-packager/.github/no-response.yml create mode 100644 node_modules/electron-packager/.github/pull_request_template.md create mode 100644 node_modules/electron-packager/.npmignore create mode 100644 node_modules/electron-packager/.travis.yml create mode 100644 node_modules/electron-packager/CODE_OF_CONDUCT.md create mode 100644 node_modules/electron-packager/CONTRIBUTING.md create mode 100644 node_modules/electron-packager/LICENSE create mode 100644 node_modules/electron-packager/NEWS.md create mode 100644 node_modules/electron-packager/SUPPORT.md create mode 100755 node_modules/electron-packager/cli.js create mode 100644 node_modules/electron-packager/collaborators.md create mode 100644 node_modules/electron-packager/common.js create mode 100644 node_modules/electron-packager/docs/_config.yml create mode 100644 node_modules/electron-packager/docs/api.md create mode 100644 node_modules/electron-packager/docs/faq.md create mode 100644 node_modules/electron-packager/download.js create mode 100644 node_modules/electron-packager/hooks.js create mode 100644 node_modules/electron-packager/ignore.js create mode 100644 node_modules/electron-packager/index.js create mode 100644 node_modules/electron-packager/infer.js create mode 100644 node_modules/electron-packager/linux.js create mode 100644 node_modules/electron-packager/mac.js create mode 100644 node_modules/electron-packager/package.json create mode 100644 node_modules/electron-packager/platform.js create mode 100644 node_modules/electron-packager/prune.js create mode 100644 node_modules/electron-packager/readme.md create mode 100644 node_modules/electron-packager/targets.js create mode 100644 node_modules/electron-packager/test/_setup.js create mode 100644 node_modules/electron-packager/test/_util.js create mode 100644 node_modules/electron-packager/test/asar.js create mode 100644 node_modules/electron-packager/test/basic.js create mode 100755 node_modules/electron-packager/test/ci/_before_script.js create mode 100644 node_modules/electron-packager/test/ci/appveyor.yml create mode 100755 node_modules/electron-packager/test/ci/before_install.sh create mode 100644 node_modules/electron-packager/test/ci/dev_ca.cnf create mode 100644 node_modules/electron-packager/test/cli.js create mode 100644 node_modules/electron-packager/test/config.json create mode 100644 node_modules/electron-packager/test/darwin.js create mode 100644 node_modules/electron-packager/test/fixtures/basic-renamed-to-electron/index.html create mode 100644 node_modules/electron-packager/test/fixtures/basic-renamed-to-electron/main.js create mode 100644 node_modules/electron-packager/test/fixtures/basic-renamed-to-electron/package.json create mode 100644 node_modules/electron-packager/test/fixtures/basic/dir_to_unpack/file1.txt create mode 100644 node_modules/electron-packager/test/fixtures/basic/electron-packager/readme.txt create mode 100644 node_modules/electron-packager/test/fixtures/basic/file_to_unpack.pac create mode 100644 node_modules/electron-packager/test/fixtures/basic/ignore.o create mode 100644 node_modules/electron-packager/test/fixtures/basic/ignore.obj create mode 100644 node_modules/electron-packager/test/fixtures/basic/ignore/this.txt create mode 100644 node_modules/electron-packager/test/fixtures/basic/ignorethis.txt create mode 100644 node_modules/electron-packager/test/fixtures/basic/index.html create mode 100644 node_modules/electron-packager/test/fixtures/basic/main.js create mode 100644 node_modules/electron-packager/test/fixtures/basic/package.json create mode 100644 node_modules/electron-packager/test/fixtures/data1.txt create mode 100644 node_modules/electron-packager/test/fixtures/el-0374/index.html create mode 100644 node_modules/electron-packager/test/fixtures/el-0374/main.js create mode 100644 node_modules/electron-packager/test/fixtures/el-0374/package.json create mode 100644 node_modules/electron-packager/test/fixtures/electron-in-dependencies/index.html create mode 100644 node_modules/electron-packager/test/fixtures/electron-in-dependencies/main.js create mode 100644 node_modules/electron-packager/test/fixtures/electron-in-dependencies/package.json create mode 100644 node_modules/electron-packager/test/fixtures/extrainfo.plist create mode 100644 node_modules/electron-packager/test/fixtures/infer-bad-fields/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-electron-prebuilt-compile/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-malformed-json/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-missing-fields/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-missing-version-only/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-non-specific-electron-prebuilt-compile/package.json create mode 100644 node_modules/electron-packager/test/fixtures/infer-win32metadata/package.json create mode 100644 node_modules/electron-packager/test/fixtures/monochrome.icns create mode 100644 node_modules/electron-packager/test/fixtures/monochrome.ico create mode 100644 node_modules/electron-packager/test/hooks.js create mode 100644 node_modules/electron-packager/test/ignore.js create mode 100644 node_modules/electron-packager/test/index.js create mode 100644 node_modules/electron-packager/test/infer.js create mode 100644 node_modules/electron-packager/test/mas.js create mode 100644 node_modules/electron-packager/test/prune.js create mode 100644 node_modules/electron-packager/test/targets.js create mode 100644 node_modules/electron-packager/test/win32.js create mode 100644 node_modules/electron-packager/usage.txt create mode 100644 node_modules/electron-packager/win32.js create mode 100644 node_modules/env-paths/index.js create mode 100644 node_modules/env-paths/license create mode 100644 node_modules/env-paths/package.json create mode 100644 node_modules/env-paths/readme.md create mode 100644 node_modules/error-ex/LICENSE create mode 100644 node_modules/error-ex/README.md create mode 100644 node_modules/error-ex/index.js create mode 100644 node_modules/error-ex/package.json create mode 100644 node_modules/extend/.eslintrc create mode 100644 node_modules/extend/.jscs.json create mode 100644 node_modules/extend/.npmignore create mode 100644 node_modules/extend/.travis.yml create mode 100644 node_modules/extend/CHANGELOG.md create mode 100644 node_modules/extend/LICENSE create mode 100644 node_modules/extend/README.md create mode 100644 node_modules/extend/component.json create mode 100644 node_modules/extend/index.js create mode 100644 node_modules/extend/package.json create mode 100644 node_modules/extract-zip/.npmignore create mode 100644 node_modules/extract-zip/.travis.yml create mode 100644 node_modules/extract-zip/CONTRIBUTING.md create mode 100644 node_modules/extract-zip/LICENSE create mode 100755 node_modules/extract-zip/cli.js create mode 100644 node_modules/extract-zip/index.js create mode 120000 node_modules/extract-zip/node_modules/.bin/mkdirp create mode 100644 node_modules/extract-zip/node_modules/debug/.coveralls.yml create mode 100644 node_modules/extract-zip/node_modules/debug/.eslintrc create mode 100644 node_modules/extract-zip/node_modules/debug/.npmignore create mode 100644 node_modules/extract-zip/node_modules/debug/.travis.yml create mode 100644 node_modules/extract-zip/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/extract-zip/node_modules/debug/LICENSE create mode 100644 node_modules/extract-zip/node_modules/debug/Makefile create mode 100644 node_modules/extract-zip/node_modules/debug/README.md create mode 100644 node_modules/extract-zip/node_modules/debug/component.json create mode 100644 node_modules/extract-zip/node_modules/debug/karma.conf.js create mode 100644 node_modules/extract-zip/node_modules/debug/node.js create mode 100644 node_modules/extract-zip/node_modules/debug/package.json create mode 100644 node_modules/extract-zip/node_modules/debug/src/browser.js create mode 100644 node_modules/extract-zip/node_modules/debug/src/debug.js create mode 100644 node_modules/extract-zip/node_modules/debug/src/index.js create mode 100644 node_modules/extract-zip/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/extract-zip/node_modules/debug/src/node.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/.npmignore create mode 100644 node_modules/extract-zip/node_modules/mkdirp/.travis.yml create mode 100644 node_modules/extract-zip/node_modules/mkdirp/LICENSE create mode 100755 node_modules/extract-zip/node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/extract-zip/node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/index.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/package.json create mode 100644 node_modules/extract-zip/node_modules/mkdirp/readme.markdown create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/perm.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/race.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/rel.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/return.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/root.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/sync.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/umask.js create mode 100644 node_modules/extract-zip/node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/extract-zip/package.json create mode 100644 node_modules/extract-zip/readme.md create mode 100644 node_modules/extsprintf/.gitmodules create mode 100644 node_modules/extsprintf/.npmignore create mode 100644 node_modules/extsprintf/LICENSE create mode 100644 node_modules/extsprintf/Makefile create mode 100644 node_modules/extsprintf/Makefile.targ create mode 100644 node_modules/extsprintf/README.md create mode 100644 node_modules/extsprintf/jsl.node.conf create mode 100644 node_modules/extsprintf/lib/extsprintf.js create mode 100644 node_modules/extsprintf/package.json create mode 100644 node_modules/fast-deep-equal/LICENSE create mode 100644 node_modules/fast-deep-equal/README.md create mode 100644 node_modules/fast-deep-equal/index.d.ts create mode 100644 node_modules/fast-deep-equal/index.js create mode 100644 node_modules/fast-deep-equal/package.json create mode 100644 node_modules/fast-json-stable-stringify/.eslintrc.yml create mode 100644 node_modules/fast-json-stable-stringify/.npmignore create mode 100644 node_modules/fast-json-stable-stringify/.travis.yml create mode 100644 node_modules/fast-json-stable-stringify/LICENSE create mode 100644 node_modules/fast-json-stable-stringify/README.md create mode 100644 node_modules/fast-json-stable-stringify/benchmark/index.js create mode 100644 node_modules/fast-json-stable-stringify/benchmark/test.json create mode 100644 node_modules/fast-json-stable-stringify/example/key_cmp.js create mode 100644 node_modules/fast-json-stable-stringify/example/nested.js create mode 100644 node_modules/fast-json-stable-stringify/example/str.js create mode 100644 node_modules/fast-json-stable-stringify/example/value_cmp.js create mode 100644 node_modules/fast-json-stable-stringify/index.js create mode 100644 node_modules/fast-json-stable-stringify/package.json create mode 100644 node_modules/fast-json-stable-stringify/test/cmp.js create mode 100644 node_modules/fast-json-stable-stringify/test/nested.js create mode 100644 node_modules/fast-json-stable-stringify/test/str.js create mode 100644 node_modules/fast-json-stable-stringify/test/to-json.js create mode 100644 node_modules/fd-slicer/.npmignore create mode 100644 node_modules/fd-slicer/.travis.yml create mode 100644 node_modules/fd-slicer/CHANGELOG.md create mode 100644 node_modules/fd-slicer/LICENSE create mode 100644 node_modules/fd-slicer/README.md create mode 100644 node_modules/fd-slicer/index.js create mode 100644 node_modules/fd-slicer/package.json create mode 100644 node_modules/fd-slicer/test/test.js create mode 100644 node_modules/find-up/index.js create mode 100644 node_modules/find-up/license create mode 100644 node_modules/find-up/node_modules/path-exists/index.js create mode 100644 node_modules/find-up/node_modules/path-exists/license create mode 100644 node_modules/find-up/node_modules/path-exists/package.json create mode 100644 node_modules/find-up/node_modules/path-exists/readme.md create mode 100644 node_modules/find-up/package.json create mode 100644 node_modules/find-up/readme.md create mode 100644 node_modules/flora-colossus/.npmignore create mode 100644 node_modules/flora-colossus/.travis.yml create mode 100644 node_modules/flora-colossus/README.md create mode 100644 node_modules/flora-colossus/lib/Walker.d.ts create mode 100644 node_modules/flora-colossus/lib/Walker.js create mode 100644 node_modules/flora-colossus/lib/Walker.js.map create mode 100644 node_modules/flora-colossus/lib/depTypes.d.ts create mode 100644 node_modules/flora-colossus/lib/depTypes.js create mode 100644 node_modules/flora-colossus/lib/depTypes.js.map create mode 100644 node_modules/flora-colossus/lib/index.d.ts create mode 100644 node_modules/flora-colossus/lib/index.js create mode 100644 node_modules/flora-colossus/lib/index.js.map create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/LICENSE create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/README.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/fs-read-write.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/move.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/pathExists-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/pathExists.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/copy/ncp.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/util/buffer.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/flora-colossus/node_modules/fs-extra/package.json create mode 100644 node_modules/flora-colossus/node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/flora-colossus/node_modules/jsonfile/LICENSE create mode 100644 node_modules/flora-colossus/node_modules/jsonfile/README.md create mode 100644 node_modules/flora-colossus/node_modules/jsonfile/index.js create mode 100644 node_modules/flora-colossus/node_modules/jsonfile/package.json create mode 100644 node_modules/flora-colossus/package.json create mode 100644 node_modules/flora-colossus/tsconfig.json create mode 100644 node_modules/flora-colossus/yarn.lock create mode 100644 node_modules/forever-agent/LICENSE create mode 100644 node_modules/forever-agent/README.md create mode 100644 node_modules/forever-agent/index.js create mode 100644 node_modules/forever-agent/package.json create mode 100644 node_modules/form-data/License create mode 100644 node_modules/form-data/README.md create mode 100644 node_modules/form-data/README.md.bak create mode 100644 node_modules/form-data/lib/browser.js create mode 100644 node_modules/form-data/lib/form_data.js create mode 100644 node_modules/form-data/lib/populate.js create mode 100644 node_modules/form-data/package.json create mode 100644 node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/fs-extra/LICENSE create mode 100644 node_modules/fs-extra/README.md create mode 100644 node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/fs-extra/docs/fs-read-write.md create mode 100644 node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/fs-extra/docs/move.md create mode 100644 node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/fs-extra/docs/pathExists-sync.md create mode 100644 node_modules/fs-extra/docs/pathExists.md create mode 100644 node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/fs-extra/lib/index.js create mode 100644 node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/fs-extra/lib/util/buffer.js create mode 100644 node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/fs-extra/node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/fs-extra/node_modules/jsonfile/LICENSE create mode 100644 node_modules/fs-extra/node_modules/jsonfile/README.md create mode 100644 node_modules/fs-extra/node_modules/jsonfile/index.js create mode 100644 node_modules/fs-extra/node_modules/jsonfile/package.json create mode 100644 node_modules/fs-extra/package.json create mode 100644 node_modules/fs.realpath/LICENSE create mode 100644 node_modules/fs.realpath/README.md create mode 100644 node_modules/fs.realpath/index.js create mode 100644 node_modules/fs.realpath/old.js create mode 100644 node_modules/fs.realpath/package.json create mode 100644 node_modules/galactus/.npmignore create mode 100644 node_modules/galactus/.nyc_output/00c728c3437da37b0c97398e7e596f35.json create mode 100644 node_modules/galactus/.nyc_output/b1b801e11369500b7ee32c579e280104.json create mode 100644 node_modules/galactus/README.md create mode 100644 node_modules/galactus/lib/DestroyerOfModules.d.ts create mode 100644 node_modules/galactus/lib/DestroyerOfModules.js create mode 100644 node_modules/galactus/lib/DestroyerOfModules.js.map create mode 100644 node_modules/galactus/lib/index.d.ts create mode 100644 node_modules/galactus/lib/index.js create mode 100644 node_modules/galactus/lib/index.js.map create mode 100644 node_modules/galactus/node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/galactus/node_modules/fs-extra/LICENSE create mode 100644 node_modules/galactus/node_modules/fs-extra/README.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/fs-read-write.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/move.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/pathExists-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/pathExists.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/galactus/node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/copy/ncp.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/util/buffer.js create mode 100644 node_modules/galactus/node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/galactus/node_modules/fs-extra/package.json create mode 100644 node_modules/galactus/node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/galactus/node_modules/jsonfile/LICENSE create mode 100644 node_modules/galactus/node_modules/jsonfile/README.md create mode 100644 node_modules/galactus/node_modules/jsonfile/index.js create mode 100644 node_modules/galactus/node_modules/jsonfile/package.json create mode 100644 node_modules/galactus/package.json create mode 100644 node_modules/galactus/tsconfig.json create mode 100644 node_modules/galactus/tslint.json create mode 100644 node_modules/galactus/yarn.lock create mode 100644 node_modules/get-package-info/.babelrc create mode 100644 node_modules/get-package-info/.npmignore create mode 100644 node_modules/get-package-info/.travis.yml create mode 100644 node_modules/get-package-info/LICENSE create mode 100644 node_modules/get-package-info/README.md create mode 100644 node_modules/get-package-info/lib/index.js create mode 100644 node_modules/get-package-info/node_modules/debug/.coveralls.yml create mode 100644 node_modules/get-package-info/node_modules/debug/.eslintrc create mode 100644 node_modules/get-package-info/node_modules/debug/.npmignore create mode 100644 node_modules/get-package-info/node_modules/debug/.travis.yml create mode 100644 node_modules/get-package-info/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/get-package-info/node_modules/debug/LICENSE create mode 100644 node_modules/get-package-info/node_modules/debug/Makefile create mode 100644 node_modules/get-package-info/node_modules/debug/README.md create mode 100644 node_modules/get-package-info/node_modules/debug/component.json create mode 100644 node_modules/get-package-info/node_modules/debug/karma.conf.js create mode 100644 node_modules/get-package-info/node_modules/debug/node.js create mode 100644 node_modules/get-package-info/node_modules/debug/package.json create mode 100644 node_modules/get-package-info/node_modules/debug/src/browser.js create mode 100644 node_modules/get-package-info/node_modules/debug/src/debug.js create mode 100644 node_modules/get-package-info/node_modules/debug/src/index.js create mode 100644 node_modules/get-package-info/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/get-package-info/node_modules/debug/src/node.js create mode 100644 node_modules/get-package-info/node_modules/find-up/index.js create mode 100644 node_modules/get-package-info/node_modules/find-up/license create mode 100644 node_modules/get-package-info/node_modules/find-up/package.json create mode 100644 node_modules/get-package-info/node_modules/find-up/readme.md create mode 100644 node_modules/get-package-info/node_modules/load-json-file/index.js create mode 100644 node_modules/get-package-info/node_modules/load-json-file/license create mode 100644 node_modules/get-package-info/node_modules/load-json-file/package.json create mode 100644 node_modules/get-package-info/node_modules/load-json-file/readme.md create mode 100644 node_modules/get-package-info/node_modules/path-type/index.js create mode 100644 node_modules/get-package-info/node_modules/path-type/license create mode 100644 node_modules/get-package-info/node_modules/path-type/package.json create mode 100644 node_modules/get-package-info/node_modules/path-type/readme.md create mode 100644 node_modules/get-package-info/node_modules/pify/index.js create mode 100644 node_modules/get-package-info/node_modules/pify/license create mode 100644 node_modules/get-package-info/node_modules/pify/package.json create mode 100644 node_modules/get-package-info/node_modules/pify/readme.md create mode 100644 node_modules/get-package-info/node_modules/read-pkg-up/index.js create mode 100644 node_modules/get-package-info/node_modules/read-pkg-up/license create mode 100644 node_modules/get-package-info/node_modules/read-pkg-up/package.json create mode 100644 node_modules/get-package-info/node_modules/read-pkg-up/readme.md create mode 100644 node_modules/get-package-info/node_modules/read-pkg/index.js create mode 100644 node_modules/get-package-info/node_modules/read-pkg/license create mode 100644 node_modules/get-package-info/node_modules/read-pkg/package.json create mode 100644 node_modules/get-package-info/node_modules/read-pkg/readme.md create mode 100644 node_modules/get-package-info/node_modules/strip-bom/index.js create mode 100644 node_modules/get-package-info/node_modules/strip-bom/license create mode 100644 node_modules/get-package-info/node_modules/strip-bom/package.json create mode 100644 node_modules/get-package-info/node_modules/strip-bom/readme.md create mode 100644 node_modules/get-package-info/package.json create mode 100644 node_modules/get-package-info/test/node_modules/we/need/to/go/deeper/package.json create mode 100644 node_modules/get-package-info/test/node_modules/we/need/to/go/package.json create mode 100644 node_modules/get-package-info/test/node_modules/we/package.json create mode 100644 node_modules/get-package-info/test/test.js create mode 100644 node_modules/get-stdin/index.js create mode 100644 node_modules/get-stdin/package.json create mode 100644 node_modules/get-stdin/readme.md create mode 100644 node_modules/getpass/.npmignore create mode 100644 node_modules/getpass/.travis.yml create mode 100644 node_modules/getpass/LICENSE create mode 100644 node_modules/getpass/README.md create mode 100644 node_modules/getpass/lib/index.js create mode 100644 node_modules/getpass/package.json create mode 100644 node_modules/glob/LICENSE create mode 100644 node_modules/glob/README.md create mode 100644 node_modules/glob/common.js create mode 100644 node_modules/glob/glob.js create mode 100644 node_modules/glob/package.json create mode 100644 node_modules/glob/sync.js create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/fs.js create mode 100644 node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/graceful-fs/legacy-streams.js create mode 100644 node_modules/graceful-fs/package.json create mode 100644 node_modules/graceful-fs/polyfills.js create mode 100644 node_modules/har-schema/LICENSE create mode 100644 node_modules/har-schema/README.md create mode 100644 node_modules/har-schema/lib/afterRequest.json create mode 100644 node_modules/har-schema/lib/beforeRequest.json create mode 100644 node_modules/har-schema/lib/browser.json create mode 100644 node_modules/har-schema/lib/cache.json create mode 100644 node_modules/har-schema/lib/content.json create mode 100644 node_modules/har-schema/lib/cookie.json create mode 100644 node_modules/har-schema/lib/creator.json create mode 100644 node_modules/har-schema/lib/entry.json create mode 100644 node_modules/har-schema/lib/har.json create mode 100644 node_modules/har-schema/lib/header.json create mode 100644 node_modules/har-schema/lib/index.js create mode 100644 node_modules/har-schema/lib/log.json create mode 100644 node_modules/har-schema/lib/page.json create mode 100644 node_modules/har-schema/lib/pageTimings.json create mode 100644 node_modules/har-schema/lib/postData.json create mode 100644 node_modules/har-schema/lib/query.json create mode 100644 node_modules/har-schema/lib/request.json create mode 100644 node_modules/har-schema/lib/response.json create mode 100644 node_modules/har-schema/lib/timings.json create mode 100644 node_modules/har-schema/package.json create mode 100644 node_modules/har-validator/LICENSE create mode 100644 node_modules/har-validator/README.md create mode 100644 node_modules/har-validator/lib/async.js create mode 100644 node_modules/har-validator/lib/error.js create mode 100644 node_modules/har-validator/lib/promise.js create mode 100644 node_modules/har-validator/package.json create mode 100755 node_modules/hawk/.npmignore create mode 100755 node_modules/hawk/LICENSE create mode 100755 node_modules/hawk/README.md create mode 100755 node_modules/hawk/client.js create mode 100755 node_modules/hawk/lib/browser.js create mode 100755 node_modules/hawk/lib/client.js create mode 100755 node_modules/hawk/lib/crypto.js create mode 100755 node_modules/hawk/lib/index.js create mode 100755 node_modules/hawk/lib/server.js create mode 100755 node_modules/hawk/lib/utils.js create mode 100755 node_modules/hawk/package.json create mode 100644 node_modules/hoek/.npmignore create mode 100644 node_modules/hoek/LICENSE create mode 100644 node_modules/hoek/README.md create mode 100755 node_modules/hoek/lib/escape.js create mode 100755 node_modules/hoek/lib/index.js create mode 100644 node_modules/hoek/package.json create mode 100644 node_modules/hosted-git-info/CHANGELOG.md create mode 100644 node_modules/hosted-git-info/LICENSE create mode 100644 node_modules/hosted-git-info/README.md create mode 100644 node_modules/hosted-git-info/git-host-info.js create mode 100644 node_modules/hosted-git-info/git-host.js create mode 100644 node_modules/hosted-git-info/index.js create mode 100644 node_modules/hosted-git-info/package.json create mode 100644 node_modules/http-signature/.dir-locals.el create mode 100644 node_modules/http-signature/.npmignore create mode 100644 node_modules/http-signature/CHANGES.md create mode 100644 node_modules/http-signature/LICENSE create mode 100644 node_modules/http-signature/README.md create mode 100644 node_modules/http-signature/http_signing.md create mode 100644 node_modules/http-signature/lib/index.js create mode 100644 node_modules/http-signature/lib/parser.js create mode 100644 node_modules/http-signature/lib/signer.js create mode 100644 node_modules/http-signature/lib/utils.js create mode 100644 node_modules/http-signature/lib/verify.js create mode 100644 node_modules/http-signature/package.json create mode 100644 node_modules/indent-string/index.js create mode 100644 node_modules/indent-string/license create mode 100644 node_modules/indent-string/package.json create mode 100644 node_modules/indent-string/readme.md create mode 100644 node_modules/inflight/LICENSE create mode 100644 node_modules/inflight/README.md create mode 100644 node_modules/inflight/inflight.js create mode 100644 node_modules/inflight/package.json create mode 100644 node_modules/inherits/LICENSE create mode 100644 node_modules/inherits/README.md create mode 100644 node_modules/inherits/inherits.js create mode 100644 node_modules/inherits/inherits_browser.js create mode 100644 node_modules/inherits/package.json create mode 100644 node_modules/ini/LICENSE create mode 100644 node_modules/ini/README.md create mode 100644 node_modules/ini/ini.js create mode 100644 node_modules/ini/package.json create mode 100644 node_modules/is-arrayish/.editorconfig create mode 100644 node_modules/is-arrayish/.istanbul.yml create mode 100644 node_modules/is-arrayish/.npmignore create mode 100644 node_modules/is-arrayish/.travis.yml create mode 100644 node_modules/is-arrayish/LICENSE create mode 100644 node_modules/is-arrayish/README.md create mode 100644 node_modules/is-arrayish/index.js create mode 100644 node_modules/is-arrayish/package.json create mode 100644 node_modules/is-builtin-module/index.js create mode 100644 node_modules/is-builtin-module/license create mode 100644 node_modules/is-builtin-module/package.json create mode 100644 node_modules/is-builtin-module/readme.md create mode 100644 node_modules/is-finite/index.js create mode 100644 node_modules/is-finite/license create mode 100644 node_modules/is-finite/package.json create mode 100644 node_modules/is-finite/readme.md create mode 100644 node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/is-promise/.npmignore create mode 100644 node_modules/is-promise/.travis.yml create mode 100644 node_modules/is-promise/LICENSE create mode 100644 node_modules/is-promise/index.js create mode 100644 node_modules/is-promise/package.json create mode 100644 node_modules/is-promise/readme.md create mode 100644 node_modules/is-typedarray/LICENSE.md create mode 100644 node_modules/is-typedarray/README.md create mode 100644 node_modules/is-typedarray/index.js create mode 100644 node_modules/is-typedarray/package.json create mode 100644 node_modules/is-typedarray/test.js create mode 100644 node_modules/is-utf8/LICENSE create mode 100644 node_modules/is-utf8/README.md create mode 100644 node_modules/is-utf8/is-utf8.js create mode 100644 node_modules/is-utf8/package.json create mode 100644 node_modules/isarray/README.md create mode 100644 node_modules/isarray/build/build.js create mode 100644 node_modules/isarray/component.json create mode 100644 node_modules/isarray/index.js create mode 100644 node_modules/isarray/package.json create mode 100644 node_modules/isbinaryfile/LICENSE.txt create mode 100644 node_modules/isbinaryfile/README.md create mode 100644 node_modules/isbinaryfile/index.js create mode 100644 node_modules/isbinaryfile/package.json create mode 100644 node_modules/isstream/.jshintrc create mode 100644 node_modules/isstream/.npmignore create mode 100644 node_modules/isstream/.travis.yml create mode 100644 node_modules/isstream/LICENSE.md create mode 100644 node_modules/isstream/README.md create mode 100644 node_modules/isstream/isstream.js create mode 100644 node_modules/isstream/package.json create mode 100644 node_modules/isstream/test.js create mode 100644 node_modules/jsbn/.npmignore create mode 100644 node_modules/jsbn/LICENSE create mode 100644 node_modules/jsbn/README.md create mode 100644 node_modules/jsbn/example.html create mode 100644 node_modules/jsbn/example.js create mode 100644 node_modules/jsbn/index.js create mode 100644 node_modules/jsbn/package.json create mode 100644 node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 node_modules/json-schema-traverse/.npmignore create mode 100644 node_modules/json-schema-traverse/.travis.yml create mode 100644 node_modules/json-schema-traverse/LICENSE create mode 100644 node_modules/json-schema-traverse/README.md create mode 100644 node_modules/json-schema-traverse/index.js create mode 100644 node_modules/json-schema-traverse/package.json create mode 100644 node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 node_modules/json-schema-traverse/spec/index.spec.js create mode 100644 node_modules/json-schema/README.md create mode 100644 node_modules/json-schema/draft-00/hyper-schema create mode 100644 node_modules/json-schema/draft-00/json-ref create mode 100644 node_modules/json-schema/draft-00/links create mode 100644 node_modules/json-schema/draft-00/schema create mode 100644 node_modules/json-schema/draft-01/hyper-schema create mode 100644 node_modules/json-schema/draft-01/json-ref create mode 100644 node_modules/json-schema/draft-01/links create mode 100644 node_modules/json-schema/draft-01/schema create mode 100644 node_modules/json-schema/draft-02/hyper-schema create mode 100644 node_modules/json-schema/draft-02/json-ref create mode 100644 node_modules/json-schema/draft-02/links create mode 100644 node_modules/json-schema/draft-02/schema create mode 100644 node_modules/json-schema/draft-03/examples/address create mode 100644 node_modules/json-schema/draft-03/examples/calendar create mode 100644 node_modules/json-schema/draft-03/examples/card create mode 100644 node_modules/json-schema/draft-03/examples/geo create mode 100644 node_modules/json-schema/draft-03/examples/interfaces create mode 100644 node_modules/json-schema/draft-03/hyper-schema create mode 100644 node_modules/json-schema/draft-03/json-ref create mode 100644 node_modules/json-schema/draft-03/links create mode 100644 node_modules/json-schema/draft-03/schema create mode 100644 node_modules/json-schema/draft-04/hyper-schema create mode 100644 node_modules/json-schema/draft-04/links create mode 100644 node_modules/json-schema/draft-04/schema create mode 100644 node_modules/json-schema/draft-zyp-json-schema-03.xml create mode 100644 node_modules/json-schema/draft-zyp-json-schema-04.xml create mode 100644 node_modules/json-schema/lib/links.js create mode 100644 node_modules/json-schema/lib/validate.js create mode 100644 node_modules/json-schema/package.json create mode 100644 node_modules/json-schema/test/tests.js create mode 100644 node_modules/json-stringify-safe/.npmignore create mode 100644 node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 node_modules/json-stringify-safe/LICENSE create mode 100644 node_modules/json-stringify-safe/Makefile create mode 100644 node_modules/json-stringify-safe/README.md create mode 100644 node_modules/json-stringify-safe/package.json create mode 100644 node_modules/json-stringify-safe/stringify.js create mode 100644 node_modules/json-stringify-safe/test/mocha.opts create mode 100644 node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 node_modules/jsonfile/.npmignore create mode 100644 node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/jsonfile/LICENSE create mode 100644 node_modules/jsonfile/README.md create mode 100644 node_modules/jsonfile/appveyor.yml create mode 100644 node_modules/jsonfile/index.js create mode 100644 node_modules/jsonfile/package.json create mode 100644 node_modules/jsprim/CHANGES.md create mode 100644 node_modules/jsprim/CONTRIBUTING.md create mode 100644 node_modules/jsprim/LICENSE create mode 100644 node_modules/jsprim/README.md create mode 100644 node_modules/jsprim/lib/jsprim.js create mode 100644 node_modules/jsprim/package.json create mode 100644 node_modules/klaw/.npmignore create mode 100644 node_modules/klaw/CHANGELOG.md create mode 100644 node_modules/klaw/LICENSE create mode 100644 node_modules/klaw/README.md create mode 100644 node_modules/klaw/package.json create mode 100644 node_modules/klaw/src/assign.js create mode 100644 node_modules/klaw/src/index.js create mode 100644 node_modules/load-json-file/index.js create mode 100644 node_modules/load-json-file/license create mode 100644 node_modules/load-json-file/node_modules/pify/index.js create mode 100644 node_modules/load-json-file/node_modules/pify/license create mode 100644 node_modules/load-json-file/node_modules/pify/package.json create mode 100644 node_modules/load-json-file/node_modules/pify/readme.md create mode 100644 node_modules/load-json-file/package.json create mode 100644 node_modules/load-json-file/readme.md create mode 100644 node_modules/locate-path/index.js create mode 100644 node_modules/locate-path/license create mode 100644 node_modules/locate-path/package.json create mode 100644 node_modules/locate-path/readme.md create mode 100644 node_modules/lodash.get/LICENSE create mode 100644 node_modules/lodash.get/README.md create mode 100644 node_modules/lodash.get/index.js create mode 100644 node_modules/lodash.get/package.json create mode 100644 node_modules/loud-rejection/api.js create mode 100644 node_modules/loud-rejection/index.js create mode 100644 node_modules/loud-rejection/license create mode 100644 node_modules/loud-rejection/package.json create mode 100644 node_modules/loud-rejection/readme.md create mode 100644 node_modules/loud-rejection/register.js create mode 100644 node_modules/map-obj/index.js create mode 100644 node_modules/map-obj/license create mode 100644 node_modules/map-obj/package.json create mode 100644 node_modules/map-obj/readme.md create mode 100644 node_modules/meow/index.js create mode 100644 node_modules/meow/license create mode 100644 node_modules/meow/node_modules/minimist/.travis.yml create mode 100644 node_modules/meow/node_modules/minimist/LICENSE create mode 100644 node_modules/meow/node_modules/minimist/example/parse.js create mode 100644 node_modules/meow/node_modules/minimist/index.js create mode 100644 node_modules/meow/node_modules/minimist/package.json create mode 100644 node_modules/meow/node_modules/minimist/readme.markdown create mode 100644 node_modules/meow/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/meow/node_modules/minimist/test/bool.js create mode 100644 node_modules/meow/node_modules/minimist/test/dash.js create mode 100644 node_modules/meow/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/meow/node_modules/minimist/test/dotted.js create mode 100644 node_modules/meow/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/meow/node_modules/minimist/test/long.js create mode 100644 node_modules/meow/node_modules/minimist/test/num.js create mode 100644 node_modules/meow/node_modules/minimist/test/parse.js create mode 100644 node_modules/meow/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/meow/node_modules/minimist/test/short.js create mode 100644 node_modules/meow/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/meow/node_modules/minimist/test/unknown.js create mode 100644 node_modules/meow/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/meow/package.json create mode 100644 node_modules/meow/readme.md create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/minimist/.travis.yml create mode 100644 node_modules/minimist/LICENSE create mode 100644 node_modules/minimist/example/parse.js create mode 100644 node_modules/minimist/index.js create mode 100644 node_modules/minimist/package.json create mode 100644 node_modules/minimist/readme.markdown create mode 100644 node_modules/minimist/test/dash.js create mode 100644 node_modules/minimist/test/default_bool.js create mode 100644 node_modules/minimist/test/dotted.js create mode 100644 node_modules/minimist/test/long.js create mode 100644 node_modules/minimist/test/parse.js create mode 100644 node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/minimist/test/short.js create mode 100644 node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mkdirp/.travis.yml create mode 100644 node_modules/mkdirp/LICENSE create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/mkdirp/index.js create mode 100644 node_modules/mkdirp/package.json create mode 100644 node_modules/mkdirp/readme.markdown create mode 100644 node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/mkdirp/test/perm.js create mode 100644 node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/mkdirp/test/race.js create mode 100644 node_modules/mkdirp/test/rel.js create mode 100644 node_modules/mkdirp/test/return.js create mode 100644 node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/mkdirp/test/root.js create mode 100644 node_modules/mkdirp/test/sync.js create mode 100644 node_modules/mkdirp/test/umask.js create mode 100644 node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/mkpath/.npmignore create mode 100644 node_modules/mkpath/LICENSE create mode 100644 node_modules/mkpath/README.md create mode 100644 node_modules/mkpath/mkpath.js create mode 100644 node_modules/mkpath/package.json create mode 100644 node_modules/mkpath/test/chmod.js create mode 100644 node_modules/mkpath/test/clobber.js create mode 100644 node_modules/mkpath/test/mkpath.js create mode 100644 node_modules/mkpath/test/perm.js create mode 100644 node_modules/mkpath/test/perm_sync.js create mode 100644 node_modules/mkpath/test/rel.js create mode 100644 node_modules/mkpath/test/root.js create mode 100644 node_modules/mkpath/test/sync.js create mode 100644 node_modules/mkpath/test/umask.js create mode 100644 node_modules/mkpath/test/umask_sync.js create mode 100644 node_modules/mksnapshot/LICENSE.md create mode 100644 node_modules/mksnapshot/README.md create mode 100644 node_modules/mksnapshot/lib/main.js create mode 100644 node_modules/mksnapshot/lib/mksnapshot-call.js create mode 100644 node_modules/mksnapshot/lib/mksnapshot-path.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/.npmignore create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/LICENSE create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/README.md create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/copy/ncp.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/streams/create-output-stream.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/streams/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/lib/walk/index.js create mode 100644 node_modules/mksnapshot/node_modules/fs-extra/package.json create mode 100644 node_modules/mksnapshot/package.json create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/license.md create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/ms/readme.md create mode 100644 node_modules/nodeify/.npmignore create mode 100644 node_modules/nodeify/.travis.yml create mode 100644 node_modules/nodeify/LICENSE create mode 100644 node_modules/nodeify/README.md create mode 100644 node_modules/nodeify/index.js create mode 100644 node_modules/nodeify/package.json create mode 100644 node_modules/nodeify/test/index.js create mode 100644 node_modules/nopt/.npmignore create mode 100644 node_modules/nopt/.travis.yml create mode 100644 node_modules/nopt/LICENSE create mode 100644 node_modules/nopt/README.md create mode 100755 node_modules/nopt/bin/nopt.js create mode 100755 node_modules/nopt/examples/my-program.js create mode 100644 node_modules/nopt/lib/nopt.js create mode 100644 node_modules/nopt/package.json create mode 100644 node_modules/nopt/test/basic.js create mode 100644 node_modules/normalize-package-data/AUTHORS create mode 100644 node_modules/normalize-package-data/LICENSE create mode 100644 node_modules/normalize-package-data/README.md create mode 100644 node_modules/normalize-package-data/lib/extract_description.js create mode 100644 node_modules/normalize-package-data/lib/fixer.js create mode 100644 node_modules/normalize-package-data/lib/make_warning.js create mode 100644 node_modules/normalize-package-data/lib/normalize.js create mode 100644 node_modules/normalize-package-data/lib/safe_format.js create mode 100644 node_modules/normalize-package-data/lib/typos.json create mode 100644 node_modules/normalize-package-data/lib/warning_messages.json create mode 100644 node_modules/normalize-package-data/package.json create mode 100644 node_modules/nugget/.npmignore create mode 100644 node_modules/nugget/.travis.yml create mode 100755 node_modules/nugget/bin.js create mode 100644 node_modules/nugget/collaborators.md create mode 100644 node_modules/nugget/index.js create mode 100644 node_modules/nugget/multiple.png create mode 100644 node_modules/nugget/node_modules/debug/.coveralls.yml create mode 100644 node_modules/nugget/node_modules/debug/.eslintrc create mode 100644 node_modules/nugget/node_modules/debug/.npmignore create mode 100644 node_modules/nugget/node_modules/debug/.travis.yml create mode 100644 node_modules/nugget/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/nugget/node_modules/debug/LICENSE create mode 100644 node_modules/nugget/node_modules/debug/Makefile create mode 100644 node_modules/nugget/node_modules/debug/README.md create mode 100644 node_modules/nugget/node_modules/debug/component.json create mode 100644 node_modules/nugget/node_modules/debug/karma.conf.js create mode 100644 node_modules/nugget/node_modules/debug/node.js create mode 100644 node_modules/nugget/node_modules/debug/package.json create mode 100644 node_modules/nugget/node_modules/debug/src/browser.js create mode 100644 node_modules/nugget/node_modules/debug/src/debug.js create mode 100644 node_modules/nugget/node_modules/debug/src/index.js create mode 100644 node_modules/nugget/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/nugget/node_modules/debug/src/node.js create mode 100644 node_modules/nugget/node_modules/minimist/.travis.yml create mode 100644 node_modules/nugget/node_modules/minimist/LICENSE create mode 100644 node_modules/nugget/node_modules/minimist/example/parse.js create mode 100644 node_modules/nugget/node_modules/minimist/index.js create mode 100644 node_modules/nugget/node_modules/minimist/package.json create mode 100644 node_modules/nugget/node_modules/minimist/readme.markdown create mode 100644 node_modules/nugget/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/nugget/node_modules/minimist/test/bool.js create mode 100644 node_modules/nugget/node_modules/minimist/test/dash.js create mode 100644 node_modules/nugget/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/nugget/node_modules/minimist/test/dotted.js create mode 100644 node_modules/nugget/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/nugget/node_modules/minimist/test/long.js create mode 100644 node_modules/nugget/node_modules/minimist/test/num.js create mode 100644 node_modules/nugget/node_modules/minimist/test/parse.js create mode 100644 node_modules/nugget/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/nugget/node_modules/minimist/test/short.js create mode 100644 node_modules/nugget/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/nugget/node_modules/minimist/test/unknown.js create mode 100644 node_modules/nugget/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/nugget/package.json create mode 100644 node_modules/nugget/readme.md create mode 100644 node_modules/nugget/test/cli.js create mode 100644 node_modules/nugget/test/resume.html create mode 100644 node_modules/nugget/test/resume.js create mode 100644 node_modules/nugget/test/test.js create mode 100644 node_modules/nugget/usage.txt create mode 100644 node_modules/number-is-nan/index.js create mode 100644 node_modules/number-is-nan/license create mode 100644 node_modules/number-is-nan/package.json create mode 100644 node_modules/number-is-nan/readme.md create mode 100644 node_modules/oauth-sign/LICENSE create mode 100644 node_modules/oauth-sign/README.md create mode 100644 node_modules/oauth-sign/index.js create mode 100644 node_modules/oauth-sign/package.json create mode 100644 node_modules/object-assign/index.js create mode 100644 node_modules/object-assign/license create mode 100644 node_modules/object-assign/package.json create mode 100644 node_modules/object-assign/readme.md create mode 100644 node_modules/object-keys/.npmignore create mode 100644 node_modules/object-keys/.travis.yml create mode 100644 node_modules/object-keys/README.md create mode 100644 node_modules/object-keys/foreach.js create mode 100644 node_modules/object-keys/index.js create mode 100644 node_modules/object-keys/isArguments.js create mode 100644 node_modules/object-keys/package.json create mode 100644 node_modules/object-keys/shim.js create mode 100644 node_modules/object-keys/test/foreach.js create mode 100644 node_modules/object-keys/test/index.js create mode 100644 node_modules/object-keys/test/isArguments.js create mode 100644 node_modules/object-keys/test/shim.js create mode 100644 node_modules/once/LICENSE create mode 100644 node_modules/once/README.md create mode 100644 node_modules/once/once.js create mode 100644 node_modules/once/package.json create mode 100644 node_modules/os-tmpdir/index.js create mode 100644 node_modules/os-tmpdir/license create mode 100644 node_modules/os-tmpdir/package.json create mode 100644 node_modules/os-tmpdir/readme.md create mode 100644 node_modules/p-limit/index.js create mode 100644 node_modules/p-limit/license create mode 100644 node_modules/p-limit/package.json create mode 100644 node_modules/p-limit/readme.md create mode 100644 node_modules/p-locate/index.js create mode 100644 node_modules/p-locate/license create mode 100644 node_modules/p-locate/package.json create mode 100644 node_modules/p-locate/readme.md create mode 100644 node_modules/p-try/index.js create mode 100644 node_modules/p-try/license create mode 100644 node_modules/p-try/package.json create mode 100644 node_modules/p-try/readme.md create mode 100644 node_modules/parse-author/LICENSE create mode 100644 node_modules/parse-author/README.md create mode 100644 node_modules/parse-author/index.js create mode 100644 node_modules/parse-author/package.json create mode 100644 node_modules/parse-json/index.js create mode 100644 node_modules/parse-json/license create mode 100644 node_modules/parse-json/package.json create mode 100644 node_modules/parse-json/readme.md create mode 100644 node_modules/parse-json/vendor/parse.js create mode 100644 node_modules/parse-json/vendor/unicode.js create mode 100644 node_modules/path-exists/index.js create mode 100644 node_modules/path-exists/license create mode 100644 node_modules/path-exists/package.json create mode 100644 node_modules/path-exists/readme.md create mode 100644 node_modules/path-is-absolute/index.js create mode 100644 node_modules/path-is-absolute/license create mode 100644 node_modules/path-is-absolute/package.json create mode 100644 node_modules/path-is-absolute/readme.md create mode 100644 node_modules/path-parse/.travis.yml create mode 100644 node_modules/path-parse/README.md create mode 100644 node_modules/path-parse/index.js create mode 100644 node_modules/path-parse/index.min.js create mode 100644 node_modules/path-parse/package.json create mode 100644 node_modules/path-parse/test.js create mode 100644 node_modules/path-parse/test.min.js create mode 100644 node_modules/path-type/index.js create mode 100644 node_modules/path-type/license create mode 100644 node_modules/path-type/node_modules/pify/index.js create mode 100644 node_modules/path-type/node_modules/pify/license create mode 100644 node_modules/path-type/node_modules/pify/package.json create mode 100644 node_modules/path-type/node_modules/pify/readme.md create mode 100644 node_modules/path-type/package.json create mode 100644 node_modules/path-type/readme.md create mode 100644 node_modules/pend/LICENSE create mode 100644 node_modules/pend/README.md create mode 100644 node_modules/pend/index.js create mode 100644 node_modules/pend/package.json create mode 100644 node_modules/pend/test.js create mode 100644 node_modules/performance-now/.npmignore create mode 100644 node_modules/performance-now/.tm_properties create mode 100644 node_modules/performance-now/.travis.yml create mode 100644 node_modules/performance-now/README.md create mode 100644 node_modules/performance-now/lib/performance-now.js create mode 100644 node_modules/performance-now/lib/performance-now.js.map create mode 100644 node_modules/performance-now/license.txt create mode 100644 node_modules/performance-now/package.json create mode 100644 node_modules/performance-now/src/index.d.ts create mode 100644 node_modules/performance-now/src/performance-now.coffee create mode 100644 node_modules/performance-now/test/mocha.opts create mode 100644 node_modules/performance-now/test/performance-now.coffee create mode 100644 node_modules/performance-now/test/scripts.coffee create mode 100755 node_modules/performance-now/test/scripts/delayed-call.coffee create mode 100755 node_modules/performance-now/test/scripts/delayed-require.coffee create mode 100755 node_modules/performance-now/test/scripts/difference.coffee create mode 100755 node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 node_modules/pify/index.js create mode 100644 node_modules/pify/license create mode 100644 node_modules/pify/package.json create mode 100644 node_modules/pify/readme.md create mode 100644 node_modules/pinkie-promise/index.js create mode 100644 node_modules/pinkie-promise/license create mode 100644 node_modules/pinkie-promise/package.json create mode 100644 node_modules/pinkie-promise/readme.md create mode 100644 node_modules/pinkie/index.js create mode 100644 node_modules/pinkie/license create mode 100644 node_modules/pinkie/package.json create mode 100644 node_modules/pinkie/readme.md create mode 100644 node_modules/plist/.jshintrc create mode 100644 node_modules/plist/.travis.yml create mode 100644 node_modules/plist/History.md create mode 100644 node_modules/plist/LICENSE create mode 100644 node_modules/plist/Makefile create mode 100644 node_modules/plist/README.md create mode 100644 node_modules/plist/examples/browser/index.html create mode 100644 node_modules/plist/index.js create mode 100644 node_modules/plist/lib/build.js create mode 100644 node_modules/plist/lib/parse.js create mode 100644 node_modules/plist/package.json create mode 100755 node_modules/pretty-bytes/cli.js create mode 100644 node_modules/pretty-bytes/license create mode 100644 node_modules/pretty-bytes/package.json create mode 100644 node_modules/pretty-bytes/pretty-bytes.js create mode 100644 node_modules/pretty-bytes/readme.md create mode 100644 node_modules/process-nextick-args/index.js create mode 100644 node_modules/process-nextick-args/license.md create mode 100644 node_modules/process-nextick-args/package.json create mode 100644 node_modules/process-nextick-args/readme.md create mode 100644 node_modules/progress-stream/.npmignore create mode 100644 node_modules/progress-stream/LICENSE create mode 100644 node_modules/progress-stream/README.md create mode 100644 node_modules/progress-stream/index.js create mode 100644 node_modules/progress-stream/package.json create mode 100644 node_modules/progress-stream/test/http.js create mode 100644 node_modules/progress-stream/test/request.js create mode 100644 node_modules/promise/.npmignore create mode 100644 node_modules/promise/Readme.md create mode 100644 node_modules/promise/index.js create mode 100644 node_modules/promise/package.json create mode 100644 node_modules/punycode/LICENSE-MIT.txt create mode 100644 node_modules/punycode/README.md create mode 100644 node_modules/punycode/package.json create mode 100644 node_modules/punycode/punycode.js create mode 100644 node_modules/q/CHANGES.md create mode 100644 node_modules/q/LICENSE create mode 100644 node_modules/q/README.md create mode 100644 node_modules/q/package.json create mode 100644 node_modules/q/q.js create mode 100644 node_modules/q/queue.js create mode 100644 node_modules/qs/.editorconfig create mode 100644 node_modules/qs/.eslintignore create mode 100644 node_modules/qs/.eslintrc create mode 100644 node_modules/qs/CHANGELOG.md create mode 100644 node_modules/qs/LICENSE create mode 100644 node_modules/qs/README.md create mode 100644 node_modules/qs/lib/formats.js create mode 100644 node_modules/qs/lib/index.js create mode 100644 node_modules/qs/lib/parse.js create mode 100644 node_modules/qs/lib/stringify.js create mode 100644 node_modules/qs/lib/utils.js create mode 100644 node_modules/qs/package.json create mode 100644 node_modules/qs/test/.eslintrc create mode 100644 node_modules/qs/test/index.js create mode 100644 node_modules/qs/test/parse.js create mode 100644 node_modules/qs/test/stringify.js create mode 100644 node_modules/qs/test/utils.js create mode 100644 node_modules/rc/LICENSE.APACHE2 create mode 100644 node_modules/rc/LICENSE.BSD create mode 100644 node_modules/rc/LICENSE.MIT create mode 100644 node_modules/rc/README.md create mode 100644 node_modules/rc/browser.js create mode 100755 node_modules/rc/cli.js create mode 100755 node_modules/rc/index.js create mode 100644 node_modules/rc/lib/utils.js create mode 100644 node_modules/rc/node_modules/minimist/.travis.yml create mode 100644 node_modules/rc/node_modules/minimist/LICENSE create mode 100644 node_modules/rc/node_modules/minimist/example/parse.js create mode 100644 node_modules/rc/node_modules/minimist/index.js create mode 100644 node_modules/rc/node_modules/minimist/package.json create mode 100644 node_modules/rc/node_modules/minimist/readme.markdown create mode 100644 node_modules/rc/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/rc/node_modules/minimist/test/bool.js create mode 100644 node_modules/rc/node_modules/minimist/test/dash.js create mode 100644 node_modules/rc/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/rc/node_modules/minimist/test/dotted.js create mode 100644 node_modules/rc/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/rc/node_modules/minimist/test/long.js create mode 100644 node_modules/rc/node_modules/minimist/test/num.js create mode 100644 node_modules/rc/node_modules/minimist/test/parse.js create mode 100644 node_modules/rc/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/rc/node_modules/minimist/test/short.js create mode 100644 node_modules/rc/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/rc/node_modules/minimist/test/unknown.js create mode 100644 node_modules/rc/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/rc/package.json create mode 100644 node_modules/rc/test/ini.js create mode 100644 node_modules/rc/test/nested-env-vars.js create mode 100644 node_modules/rc/test/test.js create mode 100644 node_modules/rcedit/LICENSE create mode 100644 node_modules/rcedit/README.md create mode 100644 node_modules/rcedit/bin/rcedit.exe create mode 100644 node_modules/rcedit/lib/rcedit.js create mode 100644 node_modules/rcedit/package.json create mode 100644 node_modules/read-pkg-up/index.js create mode 100644 node_modules/read-pkg-up/license create mode 100644 node_modules/read-pkg-up/package.json create mode 100644 node_modules/read-pkg-up/readme.md create mode 100644 node_modules/read-pkg/index.js create mode 100644 node_modules/read-pkg/license create mode 100644 node_modules/read-pkg/package.json create mode 100644 node_modules/read-pkg/readme.md create mode 100644 node_modules/readable-stream/.npmignore create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/duplex.js create mode 100644 node_modules/readable-stream/float.patch create mode 100644 node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/readable-stream/package.json create mode 100644 node_modules/readable-stream/passthrough.js create mode 100644 node_modules/readable-stream/readable.js create mode 100644 node_modules/readable-stream/transform.js create mode 100644 node_modules/readable-stream/writable.js create mode 100644 node_modules/redent/index.js create mode 100644 node_modules/redent/license create mode 100644 node_modules/redent/package.json create mode 100644 node_modules/redent/readme.md create mode 100644 node_modules/repeating/index.js create mode 100644 node_modules/repeating/license create mode 100644 node_modules/repeating/package.json create mode 100644 node_modules/repeating/readme.md create mode 100644 node_modules/request/CHANGELOG.md create mode 100644 node_modules/request/LICENSE create mode 100644 node_modules/request/README.md create mode 100755 node_modules/request/index.js create mode 100644 node_modules/request/lib/auth.js create mode 100644 node_modules/request/lib/cookies.js create mode 100644 node_modules/request/lib/getProxyFromURI.js create mode 100644 node_modules/request/lib/har.js create mode 100644 node_modules/request/lib/helpers.js create mode 100644 node_modules/request/lib/multipart.js create mode 100644 node_modules/request/lib/oauth.js create mode 100644 node_modules/request/lib/querystring.js create mode 100644 node_modules/request/lib/redirect.js create mode 100644 node_modules/request/lib/tunnel.js create mode 100644 node_modules/request/package.json create mode 100644 node_modules/request/request.js create mode 100644 node_modules/resolve/.editorconfig create mode 100644 node_modules/resolve/.eslintignore create mode 100644 node_modules/resolve/.eslintrc create mode 100644 node_modules/resolve/.travis.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/appveyor.yml create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/test/.eslintrc create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node-modules-paths.js create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/browser_field/a.js create mode 100644 node_modules/resolve/test/resolver/browser_field/b.js create mode 100644 node_modules/resolve/test/resolver/browser_field/package.json create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/dot_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_main/package.json create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/package.json create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/resolve/test/symlinks.js create mode 100644 node_modules/rimraf/LICENSE create mode 100644 node_modules/rimraf/README.md create mode 100755 node_modules/rimraf/bin.js create mode 100644 node_modules/rimraf/node_modules/glob/LICENSE create mode 100644 node_modules/rimraf/node_modules/glob/README.md create mode 100644 node_modules/rimraf/node_modules/glob/changelog.md create mode 100644 node_modules/rimraf/node_modules/glob/common.js create mode 100644 node_modules/rimraf/node_modules/glob/glob.js create mode 100644 node_modules/rimraf/node_modules/glob/package.json create mode 100644 node_modules/rimraf/node_modules/glob/sync.js create mode 100644 node_modules/rimraf/package.json create mode 100644 node_modules/rimraf/rimraf.js create mode 100644 node_modules/safe-buffer/LICENSE create mode 100644 node_modules/safe-buffer/README.md create mode 100644 node_modules/safe-buffer/index.d.ts create mode 100644 node_modules/safe-buffer/index.js create mode 100644 node_modules/safe-buffer/package.json create mode 100644 node_modules/sanitize-filename/.gitmodules create mode 100644 node_modules/sanitize-filename/.npmignore create mode 100644 node_modules/sanitize-filename/.travis.yml create mode 100644 node_modules/sanitize-filename/.zuul.yml create mode 100644 node_modules/sanitize-filename/AUTHORS create mode 100644 node_modules/sanitize-filename/Changelog.md create mode 100644 node_modules/sanitize-filename/LICENSE.md create mode 100644 node_modules/sanitize-filename/README.md create mode 100644 node_modules/sanitize-filename/index.js create mode 100644 node_modules/sanitize-filename/package.json create mode 100644 node_modules/sanitize-filename/test.js create mode 100644 node_modules/semver/LICENSE create mode 100644 node_modules/semver/README.md create mode 100755 node_modules/semver/bin/semver create mode 100644 node_modules/semver/package.json create mode 100644 node_modules/semver/range.bnf create mode 100644 node_modules/semver/semver.js create mode 100644 node_modules/signal-exit/CHANGELOG.md create mode 100644 node_modules/signal-exit/LICENSE.txt create mode 100644 node_modules/signal-exit/README.md create mode 100644 node_modules/signal-exit/index.js create mode 100644 node_modules/signal-exit/package.json create mode 100644 node_modules/signal-exit/signals.js create mode 100644 node_modules/single-line-log/.npmignore create mode 100644 node_modules/single-line-log/LICENSE create mode 100644 node_modules/single-line-log/README.md create mode 100644 node_modules/single-line-log/index.js create mode 100644 node_modules/single-line-log/package.json create mode 100644 node_modules/single-line-log/test.js create mode 100755 node_modules/sntp/.npmignore create mode 100755 node_modules/sntp/LICENSE create mode 100755 node_modules/sntp/README.md create mode 100755 node_modules/sntp/lib/index.js create mode 100755 node_modules/sntp/package.json create mode 100644 node_modules/spdx-correct/LICENSE create mode 100644 node_modules/spdx-correct/README.md create mode 100644 node_modules/spdx-correct/index.js create mode 100644 node_modules/spdx-correct/package.json create mode 100644 node_modules/spdx-exceptions/README.md create mode 100644 node_modules/spdx-exceptions/index.json create mode 100644 node_modules/spdx-exceptions/package.json create mode 100644 node_modules/spdx-expression-parse/AUTHORS create mode 100644 node_modules/spdx-expression-parse/LICENSE create mode 100644 node_modules/spdx-expression-parse/README.md create mode 100644 node_modules/spdx-expression-parse/index.js create mode 100644 node_modules/spdx-expression-parse/package.json create mode 100644 node_modules/spdx-expression-parse/parse.js create mode 100644 node_modules/spdx-expression-parse/scan.js create mode 100644 node_modules/spdx-license-ids/README.md create mode 100644 node_modules/spdx-license-ids/deprecated.json create mode 100644 node_modules/spdx-license-ids/index.json create mode 100644 node_modules/spdx-license-ids/package.json create mode 100644 node_modules/speedometer/LICENSE create mode 100644 node_modules/speedometer/README.md create mode 100644 node_modules/speedometer/index.js create mode 100644 node_modules/speedometer/package.json create mode 100644 node_modules/sshpk/.npmignore create mode 100644 node_modules/sshpk/.travis.yml create mode 100644 node_modules/sshpk/LICENSE create mode 100644 node_modules/sshpk/README.md create mode 100755 node_modules/sshpk/bin/sshpk-conv create mode 100755 node_modules/sshpk/bin/sshpk-sign create mode 100755 node_modules/sshpk/bin/sshpk-verify create mode 100644 node_modules/sshpk/lib/algs.js create mode 100644 node_modules/sshpk/lib/certificate.js create mode 100644 node_modules/sshpk/lib/dhe.js create mode 100644 node_modules/sshpk/lib/ed-compat.js create mode 100644 node_modules/sshpk/lib/errors.js create mode 100644 node_modules/sshpk/lib/fingerprint.js create mode 100644 node_modules/sshpk/lib/formats/auto.js create mode 100644 node_modules/sshpk/lib/formats/dnssec.js create mode 100644 node_modules/sshpk/lib/formats/openssh-cert.js create mode 100644 node_modules/sshpk/lib/formats/pem.js create mode 100644 node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 node_modules/sshpk/lib/formats/ssh.js create mode 100644 node_modules/sshpk/lib/formats/x509-pem.js create mode 100644 node_modules/sshpk/lib/formats/x509.js create mode 100644 node_modules/sshpk/lib/identity.js create mode 100644 node_modules/sshpk/lib/index.js create mode 100644 node_modules/sshpk/lib/key.js create mode 100644 node_modules/sshpk/lib/private-key.js create mode 100644 node_modules/sshpk/lib/signature.js create mode 100644 node_modules/sshpk/lib/ssh-buffer.js create mode 100644 node_modules/sshpk/lib/utils.js create mode 100644 node_modules/sshpk/man/man1/sshpk-conv.1 create mode 100644 node_modules/sshpk/man/man1/sshpk-sign.1 create mode 100644 node_modules/sshpk/man/man1/sshpk-verify.1 create mode 100644 node_modules/sshpk/package.json create mode 100644 node_modules/string-width/index.js create mode 100644 node_modules/string-width/license create mode 100644 node_modules/string-width/package.json create mode 100644 node_modules/string-width/readme.md create mode 100644 node_modules/string_decoder/.npmignore create mode 100644 node_modules/string_decoder/LICENSE create mode 100644 node_modules/string_decoder/README.md create mode 100644 node_modules/string_decoder/index.js create mode 100644 node_modules/string_decoder/package.json create mode 100644 node_modules/strip-ansi/index.js create mode 100644 node_modules/strip-ansi/license create mode 100644 node_modules/strip-ansi/package.json create mode 100644 node_modules/strip-ansi/readme.md create mode 100644 node_modules/strip-bom/index.js create mode 100644 node_modules/strip-bom/license create mode 100644 node_modules/strip-bom/package.json create mode 100644 node_modules/strip-bom/readme.md create mode 100755 node_modules/strip-indent/cli.js create mode 100644 node_modules/strip-indent/index.js create mode 100644 node_modules/strip-indent/license create mode 100644 node_modules/strip-indent/package.json create mode 100644 node_modules/strip-indent/readme.md create mode 100644 node_modules/strip-json-comments/index.js create mode 100644 node_modules/strip-json-comments/license create mode 100644 node_modules/strip-json-comments/package.json create mode 100644 node_modules/strip-json-comments/readme.md create mode 100644 node_modules/sumchecker/LICENSE create mode 100644 node_modules/sumchecker/NEWS.md create mode 100644 node_modules/sumchecker/README.md create mode 100644 node_modules/sumchecker/build.js create mode 100644 node_modules/sumchecker/index.js create mode 100644 node_modules/sumchecker/node_modules/debug/.coveralls.yml create mode 100644 node_modules/sumchecker/node_modules/debug/.eslintrc create mode 100644 node_modules/sumchecker/node_modules/debug/.npmignore create mode 100644 node_modules/sumchecker/node_modules/debug/.travis.yml create mode 100644 node_modules/sumchecker/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/sumchecker/node_modules/debug/LICENSE create mode 100644 node_modules/sumchecker/node_modules/debug/Makefile create mode 100644 node_modules/sumchecker/node_modules/debug/README.md create mode 100644 node_modules/sumchecker/node_modules/debug/component.json create mode 100644 node_modules/sumchecker/node_modules/debug/karma.conf.js create mode 100644 node_modules/sumchecker/node_modules/debug/node.js create mode 100644 node_modules/sumchecker/node_modules/debug/package.json create mode 100644 node_modules/sumchecker/node_modules/debug/src/browser.js create mode 100644 node_modules/sumchecker/node_modules/debug/src/debug.js create mode 100644 node_modules/sumchecker/node_modules/debug/src/index.js create mode 100644 node_modules/sumchecker/node_modules/debug/src/inspector-log.js create mode 100644 node_modules/sumchecker/node_modules/debug/src/node.js create mode 100644 node_modules/sumchecker/package.json create mode 100644 node_modules/throttleit/.npmignore create mode 100644 node_modules/throttleit/History.md create mode 100644 node_modules/throttleit/Makefile create mode 100644 node_modules/throttleit/Readme.md create mode 100644 node_modules/throttleit/component.json create mode 100644 node_modules/throttleit/example.js create mode 100644 node_modules/throttleit/index.js create mode 100644 node_modules/throttleit/package.json create mode 100644 node_modules/through2/.jshintrc create mode 100644 node_modules/through2/.npmignore create mode 100644 node_modules/through2/.travis.yml create mode 100644 node_modules/through2/LICENSE create mode 100644 node_modules/through2/README.md create mode 100644 node_modules/through2/package.json create mode 100644 node_modules/through2/test.js create mode 100644 node_modules/through2/through2.js create mode 100644 node_modules/tmp/.npmignore create mode 100644 node_modules/tmp/.travis.yml create mode 100644 node_modules/tmp/Gruntfile.js create mode 100644 node_modules/tmp/LICENSE create mode 100644 node_modules/tmp/README.md create mode 100755 node_modules/tmp/cleanup.sh create mode 100644 node_modules/tmp/lib/tmp.js create mode 100644 node_modules/tmp/package.json create mode 100644 node_modules/tmp/test/base.js create mode 100644 node_modules/tmp/test/dir-sync-test.js create mode 100644 node_modules/tmp/test/dir-test.js create mode 100644 node_modules/tmp/test/file-sync-test.js create mode 100644 node_modules/tmp/test/file-test.js create mode 100644 node_modules/tmp/test/graceful-sync.js create mode 100644 node_modules/tmp/test/graceful.js create mode 100644 node_modules/tmp/test/issue62-sync.js create mode 100644 node_modules/tmp/test/issue62.js create mode 100644 node_modules/tmp/test/keep-sync.js create mode 100644 node_modules/tmp/test/keep.js create mode 100644 node_modules/tmp/test/name-test.js create mode 100644 node_modules/tmp/test/spawn-sync.js create mode 100644 node_modules/tmp/test/spawn.js create mode 100644 node_modules/tmp/test/symlinkme/file.js create mode 100644 node_modules/tmp/test/unsafe-sync.js create mode 100644 node_modules/tmp/test/unsafe.js create mode 100644 node_modules/touch/LICENSE create mode 100644 node_modules/touch/README.md create mode 100644 node_modules/touch/bin/touch.js create mode 120000 node_modules/touch/node_modules/.bin/nopt create mode 100644 node_modules/touch/node_modules/nopt/.npmignore create mode 100644 node_modules/touch/node_modules/nopt/LICENSE create mode 100644 node_modules/touch/node_modules/nopt/README.md create mode 100755 node_modules/touch/node_modules/nopt/bin/nopt.js create mode 100755 node_modules/touch/node_modules/nopt/examples/my-program.js create mode 100644 node_modules/touch/node_modules/nopt/lib/nopt.js create mode 100644 node_modules/touch/node_modules/nopt/package.json create mode 100644 node_modules/touch/package.json create mode 100644 node_modules/touch/test/sanity.js create mode 100644 node_modules/touch/touch.js create mode 100644 node_modules/tough-cookie/LICENSE create mode 100644 node_modules/tough-cookie/README.md create mode 100644 node_modules/tough-cookie/lib/cookie.js create mode 100644 node_modules/tough-cookie/lib/memstore.js create mode 100644 node_modules/tough-cookie/lib/pathMatch.js create mode 100644 node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 node_modules/tough-cookie/lib/pubsuffix.js create mode 100644 node_modules/tough-cookie/lib/store.js create mode 100644 node_modules/tough-cookie/package.json create mode 100644 node_modules/traverse/.npmignore create mode 100644 node_modules/traverse/LICENSE create mode 100644 node_modules/traverse/README.markdown create mode 100755 node_modules/traverse/examples/json.js create mode 100755 node_modules/traverse/examples/leaves.js create mode 100755 node_modules/traverse/examples/negative.js create mode 100755 node_modules/traverse/examples/stringify.js create mode 100755 node_modules/traverse/index.js create mode 100644 node_modules/traverse/package.json create mode 100644 node_modules/traverse/test/circular.js create mode 100644 node_modules/traverse/test/date.js create mode 100644 node_modules/traverse/test/equal.js create mode 100644 node_modules/traverse/test/instance.js create mode 100644 node_modules/traverse/test/interface.js create mode 100644 node_modules/traverse/test/json.js create mode 100644 node_modules/traverse/test/leaves.js create mode 100644 node_modules/traverse/test/mutability.js create mode 100644 node_modules/traverse/test/negative.js create mode 100644 node_modules/traverse/test/obj.js create mode 100644 node_modules/traverse/test/stop.js create mode 100644 node_modules/traverse/test/stringify.js create mode 100644 node_modules/traverse/test/super_deep.js create mode 100644 node_modules/trim-newlines/index.js create mode 100644 node_modules/trim-newlines/license create mode 100644 node_modules/trim-newlines/package.json create mode 100644 node_modules/trim-newlines/readme.md create mode 100644 node_modules/truncate-utf8-bytes/.gitmodules create mode 100644 node_modules/truncate-utf8-bytes/.npmignore create mode 100644 node_modules/truncate-utf8-bytes/.travis.yml create mode 100644 node_modules/truncate-utf8-bytes/AUTHORS create mode 100644 node_modules/truncate-utf8-bytes/README.md create mode 100644 node_modules/truncate-utf8-bytes/browser.js create mode 100644 node_modules/truncate-utf8-bytes/index.js create mode 100644 node_modules/truncate-utf8-bytes/lib/truncate.js create mode 100644 node_modules/truncate-utf8-bytes/package.json create mode 100644 node_modules/truncate-utf8-bytes/test.js create mode 100644 node_modules/tunnel-agent/LICENSE create mode 100644 node_modules/tunnel-agent/README.md create mode 100644 node_modules/tunnel-agent/index.js create mode 100644 node_modules/tunnel-agent/package.json create mode 100644 node_modules/tweetnacl/.npmignore create mode 100644 node_modules/tweetnacl/AUTHORS.md create mode 100644 node_modules/tweetnacl/CHANGELOG.md create mode 100644 node_modules/tweetnacl/LICENSE create mode 100644 node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md create mode 100644 node_modules/tweetnacl/README.md create mode 100644 node_modules/tweetnacl/nacl-fast.js create mode 100644 node_modules/tweetnacl/nacl-fast.min.js create mode 100644 node_modules/tweetnacl/nacl.d.ts create mode 100644 node_modules/tweetnacl/nacl.js create mode 100644 node_modules/tweetnacl/nacl.min.js create mode 100644 node_modules/tweetnacl/package.json create mode 100644 node_modules/typedarray/.travis.yml create mode 100644 node_modules/typedarray/LICENSE create mode 100644 node_modules/typedarray/example/tarray.js create mode 100644 node_modules/typedarray/index.js create mode 100644 node_modules/typedarray/package.json create mode 100644 node_modules/typedarray/readme.markdown create mode 100644 node_modules/typedarray/test/server/undef_globals.js create mode 100644 node_modules/typedarray/test/tarray.js create mode 100644 node_modules/universalify/LICENSE create mode 100644 node_modules/universalify/README.md create mode 100644 node_modules/universalify/index.js create mode 100644 node_modules/universalify/package.json create mode 100644 node_modules/utf8-byte-length/.gitmodules create mode 100644 node_modules/utf8-byte-length/.npmignore create mode 100644 node_modules/utf8-byte-length/.travis.yml create mode 100644 node_modules/utf8-byte-length/AUTHORS create mode 100644 node_modules/utf8-byte-length/README.md create mode 100644 node_modules/utf8-byte-length/browser.js create mode 100644 node_modules/utf8-byte-length/index.js create mode 100644 node_modules/utf8-byte-length/package.json create mode 100644 node_modules/utf8-byte-length/test.js create mode 100644 node_modules/util-deprecate/History.md create mode 100644 node_modules/util-deprecate/LICENSE create mode 100644 node_modules/util-deprecate/README.md create mode 100644 node_modules/util-deprecate/browser.js create mode 100644 node_modules/util-deprecate/node.js create mode 100644 node_modules/util-deprecate/package.json create mode 100644 node_modules/uuid/.eslintrc.json create mode 100644 node_modules/uuid/AUTHORS create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100644 node_modules/uuid/README_js.md create mode 100755 node_modules/uuid/bin/uuid create mode 100644 node_modules/uuid/index.js create mode 100644 node_modules/uuid/lib/bytesToUuid.js create mode 100644 node_modules/uuid/lib/md5-browser.js create mode 100644 node_modules/uuid/lib/md5.js create mode 100644 node_modules/uuid/lib/rng-browser.js create mode 100644 node_modules/uuid/lib/rng.js create mode 100644 node_modules/uuid/lib/sha1-browser.js create mode 100644 node_modules/uuid/lib/sha1.js create mode 100644 node_modules/uuid/lib/v35.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/v1.js create mode 100644 node_modules/uuid/v3.js create mode 100644 node_modules/uuid/v4.js create mode 100644 node_modules/uuid/v5.js create mode 100644 node_modules/validate-npm-package-license/LICENSE create mode 100644 node_modules/validate-npm-package-license/README.md create mode 100644 node_modules/validate-npm-package-license/index.js create mode 100644 node_modules/validate-npm-package-license/package.json create mode 100644 node_modules/validate-npm-package-license/test.log create mode 100644 node_modules/verror/.npmignore create mode 100644 node_modules/verror/CHANGES.md create mode 100644 node_modules/verror/CONTRIBUTING.md create mode 100644 node_modules/verror/LICENSE create mode 100644 node_modules/verror/README.md create mode 100644 node_modules/verror/lib/verror.js create mode 100644 node_modules/verror/package.json create mode 100644 node_modules/wrappy/LICENSE create mode 100644 node_modules/wrappy/README.md create mode 100644 node_modules/wrappy/package.json create mode 100644 node_modules/wrappy/wrappy.js create mode 100644 node_modules/xmlbuilder/.npmignore create mode 100644 node_modules/xmlbuilder/CHANGELOG.md create mode 100644 node_modules/xmlbuilder/LICENSE create mode 100644 node_modules/xmlbuilder/README.md create mode 100644 node_modules/xmlbuilder/lib/Utility.js create mode 100644 node_modules/xmlbuilder/lib/XMLAttribute.js create mode 100644 node_modules/xmlbuilder/lib/XMLCData.js create mode 100644 node_modules/xmlbuilder/lib/XMLComment.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDAttList.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDEntity.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDNotation.js create mode 100644 node_modules/xmlbuilder/lib/XMLDeclaration.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocType.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocument.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocumentCB.js create mode 100644 node_modules/xmlbuilder/lib/XMLElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLNode.js create mode 100644 node_modules/xmlbuilder/lib/XMLProcessingInstruction.js create mode 100644 node_modules/xmlbuilder/lib/XMLRaw.js create mode 100644 node_modules/xmlbuilder/lib/XMLStreamWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringifier.js create mode 100644 node_modules/xmlbuilder/lib/XMLText.js create mode 100644 node_modules/xmlbuilder/lib/XMLWriterBase.js create mode 100644 node_modules/xmlbuilder/lib/index.js create mode 100644 node_modules/xmlbuilder/package.json create mode 100644 node_modules/xmldom/.npmignore create mode 100644 node_modules/xmldom/.travis.yml create mode 100644 node_modules/xmldom/LICENSE create mode 100644 node_modules/xmldom/__package__.js create mode 100644 node_modules/xmldom/changelog create mode 100644 node_modules/xmldom/component.json create mode 100644 node_modules/xmldom/dom-parser.js create mode 100644 node_modules/xmldom/dom.js create mode 100644 node_modules/xmldom/package.json create mode 100644 node_modules/xmldom/readme.md create mode 100644 node_modules/xmldom/sax.js create mode 100644 node_modules/xtend/.npmignore create mode 100644 node_modules/xtend/LICENCE create mode 100644 node_modules/xtend/Makefile create mode 100644 node_modules/xtend/README.md create mode 100644 node_modules/xtend/has-keys.js create mode 100644 node_modules/xtend/index.js create mode 100644 node_modules/xtend/mutable.js create mode 100644 node_modules/xtend/package.json create mode 100644 node_modules/xtend/test.js create mode 100644 node_modules/yargs-parser/CHANGELOG.md create mode 100644 node_modules/yargs-parser/LICENSE.txt create mode 100644 node_modules/yargs-parser/README.md create mode 100644 node_modules/yargs-parser/index.js create mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/index.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/license create mode 100644 node_modules/yargs-parser/node_modules/camelcase/package.json create mode 100644 node_modules/yargs-parser/node_modules/camelcase/readme.md create mode 100644 node_modules/yargs-parser/package.json create mode 100644 node_modules/yauzl/.npmignore create mode 100644 node_modules/yauzl/.travis.yml create mode 100644 node_modules/yauzl/LICENSE create mode 100644 node_modules/yauzl/README.md create mode 100644 node_modules/yauzl/index.js create mode 100644 node_modules/yauzl/package.json diff --git a/app/node_modules/.bin/asar b/app/node_modules/.bin/asar deleted file mode 100644 index 9b8b67af..00000000 --- a/app/node_modules/.bin/asar +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../asar/bin/asar.js" "$@" - ret=$? -else - node "$basedir/../asar/bin/asar.js" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/asar b/app/node_modules/.bin/asar new file mode 120000 index 00000000..8dd306f5 --- /dev/null +++ b/app/node_modules/.bin/asar @@ -0,0 +1 @@ +../asar/bin/asar.js \ No newline at end of file diff --git a/app/node_modules/.bin/asar.cmd b/app/node_modules/.bin/asar.cmd deleted file mode 100644 index 1940faed..00000000 --- a/app/node_modules/.bin/asar.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\asar\bin\asar.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\asar\bin\asar.js" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/decompress-zip b/app/node_modules/.bin/decompress-zip deleted file mode 100644 index 45a90945..00000000 --- a/app/node_modules/.bin/decompress-zip +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../decompress-zip/bin/decompress-zip" "$@" - ret=$? -else - node "$basedir/../decompress-zip/bin/decompress-zip" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/decompress-zip b/app/node_modules/.bin/decompress-zip new file mode 120000 index 00000000..83255291 --- /dev/null +++ b/app/node_modules/.bin/decompress-zip @@ -0,0 +1 @@ +../decompress-zip/bin/decompress-zip \ No newline at end of file diff --git a/app/node_modules/.bin/decompress-zip.cmd b/app/node_modules/.bin/decompress-zip.cmd deleted file mode 100644 index c61d0453..00000000 --- a/app/node_modules/.bin/decompress-zip.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\decompress-zip\bin\decompress-zip" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\decompress-zip\bin\decompress-zip" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/electron b/app/node_modules/.bin/electron new file mode 120000 index 00000000..946101e6 --- /dev/null +++ b/app/node_modules/.bin/electron @@ -0,0 +1 @@ +../electron/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/electron-download b/app/node_modules/.bin/electron-download new file mode 120000 index 00000000..67c2aa00 --- /dev/null +++ b/app/node_modules/.bin/electron-download @@ -0,0 +1 @@ +../electron-download/build/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/electron-osx-flat b/app/node_modules/.bin/electron-osx-flat deleted file mode 100644 index bda89d67..00000000 --- a/app/node_modules/.bin/electron-osx-flat +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../electron-osx-sign/bin/electron-osx-flat.js" "$@" - ret=$? -else - node "$basedir/../electron-osx-sign/bin/electron-osx-flat.js" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/electron-osx-flat b/app/node_modules/.bin/electron-osx-flat new file mode 120000 index 00000000..04410529 --- /dev/null +++ b/app/node_modules/.bin/electron-osx-flat @@ -0,0 +1 @@ +../electron-osx-sign/bin/electron-osx-flat.js \ No newline at end of file diff --git a/app/node_modules/.bin/electron-osx-flat.cmd b/app/node_modules/.bin/electron-osx-flat.cmd deleted file mode 100644 index a4d4c811..00000000 --- a/app/node_modules/.bin/electron-osx-flat.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\electron-osx-sign\bin\electron-osx-flat.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\electron-osx-sign\bin\electron-osx-flat.js" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/electron-osx-sign b/app/node_modules/.bin/electron-osx-sign deleted file mode 100644 index 38f7949e..00000000 --- a/app/node_modules/.bin/electron-osx-sign +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../electron-osx-sign/bin/electron-osx-sign.js" "$@" - ret=$? -else - node "$basedir/../electron-osx-sign/bin/electron-osx-sign.js" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/electron-osx-sign b/app/node_modules/.bin/electron-osx-sign new file mode 120000 index 00000000..a25868ff --- /dev/null +++ b/app/node_modules/.bin/electron-osx-sign @@ -0,0 +1 @@ +../electron-osx-sign/bin/electron-osx-sign.js \ No newline at end of file diff --git a/app/node_modules/.bin/electron-osx-sign.cmd b/app/node_modules/.bin/electron-osx-sign.cmd deleted file mode 100644 index 0273fbd7..00000000 --- a/app/node_modules/.bin/electron-osx-sign.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\electron-osx-sign\bin\electron-osx-sign.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\electron-osx-sign\bin\electron-osx-sign.js" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/electron-packager b/app/node_modules/.bin/electron-packager deleted file mode 100644 index e3dc46d3..00000000 --- a/app/node_modules/.bin/electron-packager +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../electron-packager/cli.js" "$@" - ret=$? -else - node "$basedir/../electron-packager/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/electron-packager b/app/node_modules/.bin/electron-packager new file mode 120000 index 00000000..837040a3 --- /dev/null +++ b/app/node_modules/.bin/electron-packager @@ -0,0 +1 @@ +../electron-packager/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/electron-packager.cmd b/app/node_modules/.bin/electron-packager.cmd deleted file mode 100644 index c8657fff..00000000 --- a/app/node_modules/.bin/electron-packager.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\electron-packager\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\electron-packager\cli.js" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/extract-zip b/app/node_modules/.bin/extract-zip new file mode 120000 index 00000000..af9b5611 --- /dev/null +++ b/app/node_modules/.bin/extract-zip @@ -0,0 +1 @@ +../extract-zip/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/mkdirp b/app/node_modules/.bin/mkdirp new file mode 120000 index 00000000..017896ce --- /dev/null +++ b/app/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/app/node_modules/.bin/nopt b/app/node_modules/.bin/nopt deleted file mode 100644 index 714334ea..00000000 --- a/app/node_modules/.bin/nopt +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@" - ret=$? -else - node "$basedir/../nopt/bin/nopt.js" "$@" - ret=$? -fi -exit $ret diff --git a/app/node_modules/.bin/nopt b/app/node_modules/.bin/nopt new file mode 120000 index 00000000..6b6566ea --- /dev/null +++ b/app/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/app/node_modules/.bin/nopt.cmd b/app/node_modules/.bin/nopt.cmd deleted file mode 100644 index 1626454b..00000000 --- a/app/node_modules/.bin/nopt.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\nopt\bin\nopt.js" %* -) \ No newline at end of file diff --git a/app/node_modules/.bin/nugget b/app/node_modules/.bin/nugget new file mode 120000 index 00000000..eccbe4c5 --- /dev/null +++ b/app/node_modules/.bin/nugget @@ -0,0 +1 @@ +../nugget/bin.js \ No newline at end of file diff --git a/app/node_modules/.bin/pretty-bytes b/app/node_modules/.bin/pretty-bytes new file mode 120000 index 00000000..d1d4ed68 --- /dev/null +++ b/app/node_modules/.bin/pretty-bytes @@ -0,0 +1 @@ +../pretty-bytes/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/rc b/app/node_modules/.bin/rc new file mode 120000 index 00000000..48b3cda7 --- /dev/null +++ b/app/node_modules/.bin/rc @@ -0,0 +1 @@ +../rc/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/rimraf b/app/node_modules/.bin/rimraf new file mode 120000 index 00000000..4cd49a49 --- /dev/null +++ b/app/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/app/node_modules/.bin/semver b/app/node_modules/.bin/semver new file mode 120000 index 00000000..317eb293 --- /dev/null +++ b/app/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/app/node_modules/.bin/sshpk-conv b/app/node_modules/.bin/sshpk-conv new file mode 120000 index 00000000..a2a295c8 --- /dev/null +++ b/app/node_modules/.bin/sshpk-conv @@ -0,0 +1 @@ +../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/app/node_modules/.bin/sshpk-sign b/app/node_modules/.bin/sshpk-sign new file mode 120000 index 00000000..766b9b3a --- /dev/null +++ b/app/node_modules/.bin/sshpk-sign @@ -0,0 +1 @@ +../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/app/node_modules/.bin/sshpk-verify b/app/node_modules/.bin/sshpk-verify new file mode 120000 index 00000000..bfd7e3ad --- /dev/null +++ b/app/node_modules/.bin/sshpk-verify @@ -0,0 +1 @@ +../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/app/node_modules/.bin/strip-indent b/app/node_modules/.bin/strip-indent new file mode 120000 index 00000000..dddee7eb --- /dev/null +++ b/app/node_modules/.bin/strip-indent @@ -0,0 +1 @@ +../strip-indent/cli.js \ No newline at end of file diff --git a/app/node_modules/.bin/uuid b/app/node_modules/.bin/uuid new file mode 120000 index 00000000..b3e45bc5 --- /dev/null +++ b/app/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/app/node_modules/@types/node/LICENSE b/app/node_modules/@types/node/LICENSE new file mode 100644 index 00000000..21071075 --- /dev/null +++ b/app/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + 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/app/node_modules/@types/node/README.md b/app/node_modules/@types/node/README.md new file mode 100644 index 00000000..51aad638 --- /dev/null +++ b/app/node_modules/@types/node/README.md @@ -0,0 +1,16 @@ +# 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.git/tree/master/types/node/v8 + +Additional Details + * Last updated: Thu, 17 May 2018 15:41:42 GMT + * Dependencies: none + * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout + +# Credits +These definitions were written by Microsoft TypeScript , DefinitelyTyped , Parambir Singh , Christian Vaagland Tellnes , Wilco Bakker , Nicolas Voigt , Chigozirim C. , Flarna , Mariusz Wiktorczyk , wwwy3y3 , Deividas Bakanas , Kelvin Jin , Alvis HT Tang , Oliver Joseph Ash , Sebastian Silbermann , Hannes Magnusson , Alberto Schiabel , Huw , Nicolas Even , Bruno Scheufler , Hoàng Văn Khải , Lishude . diff --git a/app/node_modules/@types/node/index.d.ts b/app/node_modules/@types/node/index.d.ts new file mode 100644 index 00000000..27014e0c --- /dev/null +++ b/app/node_modules/@types/node/index.d.ts @@ -0,0 +1,7219 @@ +// Type definitions for Node.js 8.10.x +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Parambir Singh +// Christian Vaagland Tellnes +// Wilco Bakker +// Nicolas Voigt +// Chigozirim C. +// Flarna +// Mariusz Wiktorczyk +// wwwy3y3 +// Deividas Bakanas +// Kelvin Jin +// Alvis HT Tang +// Oliver Joseph Ash +// Sebastian Silbermann +// Hannes Magnusson +// Alberto Schiabel +// Huw +// Nicolas Even +// Bruno Scheufler +// Hoàng Văn Khải +// Lishude +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/** inspector module types */ +/// + +// 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; + assert(value: any, message?: string, ...optionalParams: any[]): void; + dir(obj: any, options?: NodeJS.InspectOptions): void; + debug(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + time(label: string): void; + timeEnd(label: string): void; + trace(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): 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; +} + +// compat for TypeScript 1.8 +// if you use with --target es3 or --target es5 and use below definitions, +// use the lib.es6.d.ts that is bundled with TypeScript 1.8. +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } + +// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`) +interface Iterable { } +interface Iterator { + next(value?: any): IteratorResult; +} +interface IteratorResult { } +interface SymbolConstructor { + readonly iterator: symbol; +} +declare var Symbol: SymbolConstructor; + +// 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.Timer; +declare namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; +} +declare function clearTimeout(timeoutId: NodeJS.Timer): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare function clearInterval(intervalId: NodeJS.Timer): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; +declare namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; +} +declare function clearImmediate(immediateId: any): 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; +declare var SlowBuffer: { + new(str: string, encoding?: string): Buffer; + new(size: number): Buffer; + new(size: Uint8Array): Buffer; + new(array: any[]): Buffer; + prototype: Buffer; + isBuffer(obj: any): boolean; + byteLength(string: string, encoding?: string): number; + concat(list: Buffer[], totalLength?: number): Buffer; +}; + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; +interface Buffer extends NodeBuffer { } + +/** + * 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 var 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' + */ + new(str: string, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new(array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + new(arrayBuffer: ArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new(array: any[]): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + 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 a TypedArray or a new ArrayBuffer() + */ + from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + from(data: any[] | string | Buffer | ArrayBuffer /*| TypedArray*/): 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; + /** + * 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; + /** + * 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. (TypedArray is also allowed, but it is only available starting ES2017) + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + byteLength(string: string | Buffer | DataView | ArrayBuffer, 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: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + compare(buf1: Buffer, buf2: Buffer): 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 { + export interface InspectOptions { + showHidden?: boolean; + depth?: number | null; + colors?: boolean; + customInspect?: boolean; + showProxy?: boolean; + maxArrayLength?: number | null; + breakLength?: number; + } + + export interface ConsoleConstructor { + prototype: Console; + new(stdout: WritableStream, stderr?: WritableStream): Console; + } + + export 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; + } + + export interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + export 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; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(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; + } + + export 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?: T): this; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: ReadableStream): this; + } + + export 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; + } + + export interface ReadWriteStream extends ReadableStream, WritableStream { } + + export interface Events extends EventEmitter { } + + export 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; + dispose(): void; + + 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; + } + + export interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + } + + export interface CpuUsage { + user: number; + system: number; + } + + export 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 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 = () => void; + type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + + export interface Socket extends ReadWriteStream { + isTTY?: true; + } + + export interface ProcessEnv { + [key: string]: string | undefined; + } + + export interface WriteStream extends Socket { + readonly writableHighWaterMark: number; + columns?: number; + rows?: number; + _write(chunk: any, encoding: string, callback: Function): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + setDefaultEncoding(encoding: string): this; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + } + export interface ReadStream extends Socket { + readonly readableHighWaterMark: number; + isRaw?: boolean; + setRawMode?(mode: boolean): void; + _read(size: number): void; + _destroy(err: Error, callback: Function): void; + push(chunk: any, encoding?: string): boolean; + destroy(error?: Error): void; + } + + export 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; + 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; + 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; + title: string; + arch: string; + platform: Platform; + mainModule?: NodeModule; + memoryUsage(): MemoryUsage; + cpuUsage(previousValue?: CpuUsage): CpuUsage; + nextTick(callback: Function, ...args: any[]): void; + umask(mask?: number): number; + uptime(): number; + hrtime(time?: [number, number]): [number, number]; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any): void; + disconnect(): void; + connected: boolean; + + /** + * 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; + + 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): boolean; + emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): 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; + + 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; + + 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; + + 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; + + 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[]; + } + + export 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: any) => void; + clearInterval: (intervalId: NodeJS.Timer) => void; + clearTimeout: (timeoutId: NodeJS.Timer) => 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[]) => any; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + export interface Timer { + ref(): void; + unref(): void; + } + + class Module { + static runMain(): void; + static wrap(code: string): string; + 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); + } +} + +interface IterableIterator { } + +/** + * @deprecated + */ +interface NodeBuffer extends Uint8Array { + 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: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, 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 | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/************************************************ +* * +* MODULES * +* * +************************************************/ +declare module "buffer" { + export var INSPECT_MAX_BYTES: number; + var BuffType: typeof Buffer; + var SlowBuffType: typeof SlowBuffer; + export { BuffType as Buffer, SlowBuffType as SlowBuffer }; +} + +declare module "querystring" { + export interface StringifyOptions { + encodeURIComponent?: Function; + } + + export interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: Function; + } + + interface ParsedUrlQuery { [key: string]: string | string[] | undefined; } + + export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; + export function escape(str: string): string; + export function unescape(str: string): string; +} + +declare module "events" { + class internal extends NodeJS.EventEmitter { } + + namespace internal { + export class EventEmitter extends internal { + static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated + 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; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + } + } + + export = internal; +} + +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 + export interface IncomingHttpHeaders { + 'accept'?: string; + 'access-control-allow-origin'?: string; + 'access-control-allow-credentials'?: string; + 'access-control-expose-headers'?: string; + 'access-control-max-age'?: string; + 'access-control-allow-methods'?: string; + 'access-control-allow-headers'?: string; + 'accept-patch'?: string; + 'accept-ranges'?: string; + 'authorization'?: string; + 'age'?: string; + 'allow'?: string; + 'alt-svc'?: 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; + 'date'?: string; + 'expires'?: string; + 'host'?: string; + 'last-modified'?: string; + 'location'?: string; + 'pragma'?: string; + 'proxy-authenticate'?: string; + 'public-key-pins'?: string; + 'retry-after'?: string; + 'set-cookie'?: string[]; + 'strict-transport-security'?: string; + 'trailer'?: string; + 'transfer-encoding'?: string; + 'tk'?: string; + 'upgrade'?: 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) + export interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; + } + + export 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; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: net.Socket) => void) => net.Socket; + } + + export class Server extends net.Server { + constructor(requestListener?: (req: IncomingMessage, res: ServerResponse) => void); + + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + maxHeadersCount: number; + timeout: number; + keepAliveTimeout: number; + } + /** + * @deprecated Use IncomingMessage + */ + export class ServerRequest extends IncomingMessage { + connection: net.Socket; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js + export 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; + destroy(error: Error): void; + 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 + export 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 + export class ClientRequest extends OutgoingMessage { + connection: net.Socket; + socket: net.Socket; + aborted: number; + + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + + abort(): void; + onSocket(socket: net.Socket): void; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + } + + export 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; + } + + /** + * @deprecated Use IncomingMessage + */ + export class ClientResponse extends IncomingMessage { } + + export 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; + } + + export class Agent { + 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; + } + + export var METHODS: string[]; + + export var STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + + export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; + export 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 + export interface RequestOptions extends ClientRequestArgs { } + export function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + export function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + export var globalAgent: Agent; +} + +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + export interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + inspectPort?: number | (() => number); + } + + export interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + export 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; + } + + export 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; + prependOnceListener(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. + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: any) => void): this; + } + + export function disconnect(callback?: Function): void; + export function fork(env?: any): Worker; + export var isMaster: boolean; + export var isWorker: boolean; + // TODO: cluster.schedulingPolicy + export var settings: ClusterSettings; + export function setupMaster(settings?: ClusterSettings): void; + export var worker: Worker; + export var workers: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + export function addListener(event: string, listener: (...args: any[]) => void): Cluster; + export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function addListener(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. + export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function emit(event: string | symbol, ...args: any[]): boolean; + export function emit(event: "disconnect", worker: Worker): boolean; + export function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + export function emit(event: "fork", worker: Worker): boolean; + export function emit(event: "listening", worker: Worker, address: Address): boolean; + export function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + export function emit(event: "online", worker: Worker): boolean; + export function emit(event: "setup", settings: any): boolean; + + export function on(event: string, listener: (...args: any[]) => void): Cluster; + export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function on(event: "fork", listener: (worker: Worker) => void): Cluster; + export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export 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. + export function on(event: "online", listener: (worker: Worker) => void): Cluster; + export function on(event: "setup", listener: (settings: any) => void): Cluster; + + export function once(event: string, listener: (...args: any[]) => void): Cluster; + export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function once(event: "fork", listener: (worker: Worker) => void): Cluster; + export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export 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. + export function once(event: "online", listener: (worker: Worker) => void): Cluster; + export function once(event: "setup", listener: (settings: any) => void): Cluster; + + export function removeListener(event: string, listener: (...args: any[]) => void): Cluster; + export function removeAllListeners(event?: string): Cluster; + export function setMaxListeners(n: number): Cluster; + export function getMaxListeners(): number; + export function listeners(event: string): Function[]; + export function listenerCount(type: string): number; + + export function prependListener(event: string, listener: (...args: any[]) => void): Cluster; + export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependListener(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. + export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; + export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependOnceListener(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. + export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function eventNames(): string[]; +} + +declare module "zlib" { + import * as stream from "stream"; + + export 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?: any; // deflate/inflate only, empty dictionary by default + } + + export interface Zlib { + readonly bytesRead: number; + close(callback?: () => void): void; + flush(kind?: number | (() => void), callback?: () => void): void; + } + + export interface ZlibParams { + params(level: number, strategy: number, callback: () => void): void; + } + + export interface ZlibReset { + reset(): void; + } + + export interface Gzip extends stream.Transform, Zlib { } + export interface Gunzip extends stream.Transform, Zlib { } + export interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + export interface Inflate extends stream.Transform, Zlib, ZlibReset { } + export interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + export interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } + export interface Unzip extends stream.Transform, Zlib { } + + export function createGzip(options?: ZlibOptions): Gzip; + export function createGunzip(options?: ZlibOptions): Gunzip; + export function createDeflate(options?: ZlibOptions): Deflate; + export function createInflate(options?: ZlibOptions): Inflate; + export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + export function createInflateRaw(options?: ZlibOptions): InflateRaw; + export function createUnzip(options?: ZlibOptions): Unzip; + + type InputType = string | Buffer | DataView /* | TypedArray */; + export function deflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function deflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; + export function deflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + export function gzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function gzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; + export function gunzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function gunzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; + export function inflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function inflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; + export function inflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + export function unzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function unzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; + + export namespace constants { + // Allowed flush values. + + export const Z_NO_FLUSH: number; + export const Z_PARTIAL_FLUSH: number; + export const Z_SYNC_FLUSH: number; + export const Z_FULL_FLUSH: number; + export const Z_FINISH: number; + export const Z_BLOCK: number; + export const Z_TREES: number; + + // Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events. + + export const Z_OK: number; + export const Z_STREAM_END: number; + export const Z_NEED_DICT: number; + export const Z_ERRNO: number; + export const Z_STREAM_ERROR: number; + export const Z_DATA_ERROR: number; + export const Z_MEM_ERROR: number; + export const Z_BUF_ERROR: number; + export const Z_VERSION_ERROR: number; + + // Compression levels. + + export const Z_NO_COMPRESSION: number; + export const Z_BEST_SPEED: number; + export const Z_BEST_COMPRESSION: number; + export const Z_DEFAULT_COMPRESSION: number; + + // Compression strategy. + + export const Z_FILTERED: number; + export const Z_HUFFMAN_ONLY: number; + export const Z_RLE: number; + export const Z_FIXED: number; + export const Z_DEFAULT_STRATEGY: number; + } + + // Constants + export var Z_NO_FLUSH: number; + export var Z_PARTIAL_FLUSH: number; + export var Z_SYNC_FLUSH: number; + export var Z_FULL_FLUSH: number; + export var Z_FINISH: number; + export var Z_BLOCK: number; + export var Z_TREES: number; + export var Z_OK: number; + export var Z_STREAM_END: number; + export var Z_NEED_DICT: number; + export var Z_ERRNO: number; + export var Z_STREAM_ERROR: number; + export var Z_DATA_ERROR: number; + export var Z_MEM_ERROR: number; + export var Z_BUF_ERROR: number; + export var Z_VERSION_ERROR: number; + export var Z_NO_COMPRESSION: number; + export var Z_BEST_SPEED: number; + export var Z_BEST_COMPRESSION: number; + export var Z_DEFAULT_COMPRESSION: number; + export var Z_FILTERED: number; + export var Z_HUFFMAN_ONLY: number; + export var Z_RLE: number; + export var Z_FIXED: number; + export var Z_DEFAULT_STRATEGY: number; + export var Z_BINARY: number; + export var Z_TEXT: number; + export var Z_ASCII: number; + export var Z_UNKNOWN: number; + export var Z_DEFLATED: number; +} + +declare module "os" { + export interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + export interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + } + + export interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + + export interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + + export type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + + export function hostname(): string; + export function loadavg(): number[]; + export function uptime(): number; + export function freemem(): number; + export function totalmem(): number; + export function cpus(): CpuInfo[]; + export function type(): string; + export function release(): string; + export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + export function homedir(): string; + export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string }; + export var 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; + }, + }; + export function arch(): string; + export function platform(): NodeJS.Platform; + export function tmpdir(): string; + export const EOL: string; + export function endianness(): "BE" | "LE"; +} + +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + import { URL } from "url"; + + export type ServerOptions = tls.SecureContextOptions & tls.TlsOptions; + + // see https://nodejs.org/docs/latest-v8.x/api/https.html#https_https_request_options_callback + type extendedRequestKeys = "pfx" | + "key" | + "passphrase" | + "cert" | + "ca" | + "ciphers" | + "rejectUnauthorized" | + "secureProtocol" | + "servername"; + + export type RequestOptions = http.RequestOptions & Pick; + + export interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean; + maxCachedSessions?: number; + } + + export class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + + export class Server extends tls.Server { + setTimeout(callback: () => void): this; + setTimeout(msecs?: number, callback?: () => void): this; + timeout: number; + keepAliveTimeout: number; + } + + export function createServer(options: ServerOptions, requestListener?: (req: http.IncomingMessage, res: http.ServerResponse) => void): Server; + export function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export var globalAgent: Agent; +} + +declare module "punycode" { + export function decode(string: string): string; + export function encode(string: string): string; + export function toUnicode(domain: string): string; + export function toASCII(domain: string): string; + export var ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + export var version: any; +} + +declare module "repl" { + import * as stream from "stream"; + import * as readline from "readline"; + + export interface ReplOptions { + prompt?: string; + input?: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + terminal?: boolean; + eval?: Function; + useColors?: boolean; + useGlobal?: boolean; + ignoreUndefined?: boolean; + writer?: Function; + completer?: Function; + replMode?: any; + breakEvalOnSigint?: any; + } + + export interface REPLServer extends readline.ReadLine { + context: any; + inputStream: NodeJS.ReadableStream; + outputStream: NodeJS.WritableStream; + + defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; + displayPrompt(preserveCursor?: boolean): void; + + /** + * events.EventEmitter + * 1. exit + * 2. reset + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (...args: any[]) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: any): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (...args: any[]) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (...args: any[]) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (...args: any[]) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (...args: any[]) => void): this; + } + + export function start(options?: string | ReplOptions): REPLServer; + + export class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } +} + +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + export interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + export interface ReadLine extends events.EventEmitter { + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): ReadLine; + resume(): ReadLine; + 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: any) => 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: any): 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: any) => 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: any) => 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: any) => 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: any) => 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 Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any; + + export type CompleterResult = [string[], string]; + + export interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer | AsyncCompleter; + terminal?: boolean; + historySize?: number; + } + + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine; + export function createInterface(options: ReadLineOptions): ReadLine; + + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; + export function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: ReadLine): void; + export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + export function clearLine(stream: NodeJS.WritableStream, dir: number): void; + export function clearScreenDown(stream: NodeJS.WritableStream): void; +} + +declare module "vm" { + export interface Context { } + export interface ScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + export interface RunningScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + } + export class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + } + export function createContext(sandbox?: Context): Context; + export function isContext(sandbox: Context): boolean; + export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; + export function runInDebugContext(code: string): any; + export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; + export function runInThisContext(code: string, options?: RunningScriptOptions | string): any; +} + +declare module "child_process" { + import * as events from "events"; + import * as stream from "stream"; + import * as net from "net"; + + export 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, signal: string) => 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, signal: string): 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, signal: string) => 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, signal: string) => 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, signal: string) => 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, signal: string) => void): this; + prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + } + + export interface MessageOptions { + keepOpen?: boolean; + } + + export interface SpawnOptions { + cwd?: string; + env?: any; + stdio?: any; + detached?: boolean; + uid?: number; + gid?: number; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + windowsHide?: boolean; + } + + export function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptions): ChildProcess; + + export interface ExecOptions { + cwd?: string; + env?: any; + shell?: string; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + windowsHide?: boolean; + } + + export interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + + export interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string | null; // specify `null`. + } + + // no `options` definitely means stdout/stderr are `string`. + export function exec(command: string, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, 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`. + export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + export function exec(command: string, options: ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: Error | 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. + export namespace exec { + export function __promisify__(command: string): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options: ExecOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + export interface ExecFileOptions { + cwd?: string; + env?: any; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + windowsHide?: boolean; + windowsVerbatimArguments?: boolean; + } + export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + export interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: string; + } + + export function execFile(file: string): ChildProcess; + export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + + // no `options` definitely means stdout/stderr are `string`. + export function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | 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`. + export function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, args: string[] | 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`. + export function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | 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`. + export function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + export function execFile(file: string, args: string[] | 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`. + export function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | 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`. + export 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; + export function execFile(file: string, args: string[] | 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. + export namespace execFile { + export function __promisify__(file: string): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + export interface ForkOptions { + cwd?: string; + env?: any; + execPath?: string; + execArgv?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + windowsVerbatimArguments?: boolean; + } + export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; + + export interface SpawnSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + windowsHide?: boolean; + windowsVerbatimArguments?: boolean; + } + export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + export interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number; + signal: string; + error: Error; + } + export function spawnSync(command: string): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; + + export interface ExecSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + shell?: string; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + windowsHide?: boolean; + } + export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + export function execSync(command: string): Buffer; + export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + export function execSync(command: string, options?: ExecSyncOptions): Buffer; + + export interface ExecFileSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + windowsHide?: boolean; + } + export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + export function execFileSync(command: string): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; +} + +declare module "url" { + import { ParsedUrlQuery } from 'querystring'; + + export 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` + export interface UrlObject extends UrlObjectCommon { + port?: string | number; + query?: string | null | { [key: string]: any }; + } + + // Output of `url.parse` + export interface Url extends UrlObjectCommon { + port?: string; + query?: string | null | ParsedUrlQuery; + } + + export interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + + export interface UrlWithStringQuery extends Url { + query: string | null; + } + + export function parse(urlStr: string): UrlWithStringQuery; + export function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + export function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + export function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + + export function format(URL: URL, options?: URLFormatOptions): string; + export function format(urlObject: UrlObject | string): string; + export function resolve(from: string, to: string): string; + + export function domainToASCII(domain: string): string; + export function domainToUnicode(domain: string): string; + + export interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; + } + + export 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) => 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]>; + } + + export 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; + } +} + +declare module "dns" { + // Supported getaddrinfo flags. + export const ADDRCONFIG: number; + export const V4MAPPED: number; + + export interface LookupOptions { + family?: number; + hints?: number; + all?: boolean; + } + + export interface LookupOneOptions extends LookupOptions { + all?: false; + } + + export interface LookupAllOptions extends LookupOptions { + all: true; + } + + export interface LookupAddress { + address: string; + family: number; + } + + export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void; + export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void; + export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace lookup { + export function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>; + export function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>; + export function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>; + } + + export interface ResolveOptions { + ttl: boolean; + } + + export interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + + export interface RecordWithTtl { + address: string; + ttl: number; + } + + export interface MxRecord { + priority: number; + exchange: string; + } + + export interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + + export interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + + export interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + + export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void; + export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; + export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve { + export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + export function __promisify__(hostname: string, rrtype: "MX"): Promise; + export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + export function __promisify__(hostname: string, rrtype: "SOA"): Promise; + export function __promisify__(hostname: string, rrtype: "SRV"): Promise; + export function __promisify__(hostname: string, rrtype: "TXT"): Promise; + export function __promisify__(hostname: string, rrtype?: string): Promise; + } + + export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; + export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve4 { + export function __promisify__(hostname: string): Promise; + export function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + export function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; + export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve6 { + export function __promisify__(hostname: string): Promise; + export function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + export function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; + export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; + export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void; + export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; + export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; + + export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void; + export function setServers(servers: string[]): void; + + // Error codes + export var NODATA: string; + export var FORMERR: string; + export var SERVFAIL: string; + export var NOTFOUND: string; + export var NOTIMP: string; + export var REFUSED: string; + export var BADQUERY: string; + export var BADNAME: string; + export var BADFAMILY: string; + export var BADRESP: string; + export var CONNREFUSED: string; + export var TIMEOUT: string; + export var EOF: string; + export var FILE: string; + export var NOMEM: string; + export var DESTRUCTION: string; + export var BADSTR: string; + export var BADFLAGS: string; + export var NONAME: string; + export var BADHINTS: string; + export var NOTINITIALIZED: string; + export var LOADIPHLPAPI: string; + export var ADDRGETNETWORKPARAMS: string; + export var CANCELLED: string; +} + +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; + + export interface SocketConstructorOpts { + fd?: number; + allowHalfOpen?: boolean; + readable?: boolean; + writable?: boolean; + } + + export interface TcpSocketConnectOpts { + port: number; + host?: string; + localAddress?: string; + localPort?: number; + hints?: number; + family?: number; + lookup?: LookupFunction; + } + + export interface IpcSocketConnectOpts { + path: string; + } + + export type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + + export 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; + + bufferSize: number; + setEncoding(encoding?: string): this; + destroy(err?: any): void; + pause(): this; + resume(): this; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; + address(): { port: number; family: string; address: string; }; + unref(): void; + ref(): void; + + remoteAddress?: string; + remoteFamily?: string; + remotePort?: number; + localAddress: string; + localPort: number; + bytesRead: number; + bytesWritten: number; + connecting: boolean; + destroyed: boolean; + + // 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; + } + + export interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + } + + // https://github.com/nodejs/node/blob/master/lib/net.js + export 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?: Function): this; + address(): { port: number; family: string; address: 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; + } + + export interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + export interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + export type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + + export function createServer(connectionListener?: (socket: Socket) => void): Server; + export function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; + export function connect(options: NetConnectOpts, connectionListener?: Function): Socket; + export function connect(port: number, host?: string, connectionListener?: Function): Socket; + export function connect(path: string, connectionListener?: Function): Socket; + export function createConnection(options: NetConnectOpts, connectionListener?: Function): Socket; + export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; + export function createConnection(path: string, connectionListener?: Function): Socket; + export function isIP(input: string): number; + export function isIPv4(input: string): boolean; + export function isIPv6(input: string): boolean; +} + +declare module "dgram" { + import * as events from "events"; + import * as dns from "dns"; + + interface RemoteInfo { + address: string; + family: string; + port: number; + } + + interface AddressInfo { + 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, address: string, family: number) => void) => void; + } + + export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + export 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; + 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; + } +} + +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + import { URL } from "url"; + + /** + * Valid types for path values in "fs". + */ + export type PathLike = string | Buffer | URL; + + export 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; + } + + export 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; + } + + export class ReadStream extends stream.Readable { + close(): void; + destroy(): 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; + } + + export 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_. + */ + export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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_. + */ + export 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_. + */ + export 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`. + */ + export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => 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_. + */ + export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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`. + */ + export 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`. + */ + export 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`. + */ + export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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`. + */ + export 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`. + */ + export 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. + */ + export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export function chownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number, uid: number, gid: number): Promise; + } + + /** + * Synchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export 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. + */ + export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export function statSync(path: PathLike): Stats; + + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export 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. + */ + export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => 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. + */ + export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + } + + /** + * 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. + */ + export function symlinkSync(target: PathLike, path: PathLike, type?: string | 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. + */ + export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, 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. + */ + export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, 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. + */ + export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * 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. + */ + export 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. + */ + export 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. + */ + export function realpathSync(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. + */ + export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export function rmdirSync(path: PathLike): void; + + /** + * 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 mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => 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. + */ + export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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 mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function __promisify__(path: PathLike, mode?: number | string | 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 mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync(path: PathLike, mode?: number | string | 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. + */ + export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, 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. + */ + export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, 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. + */ + export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null } | 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. + */ + export function __promisify__(path: PathLike, options: "buffer" | { encoding: "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. + */ + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): 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. + */ + export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null } | 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. + */ + export function readdirSync(path: PathLike, options: { encoding: "buffer" } | "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. + */ + export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string[] | Buffer[]; + + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export 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`. + */ + export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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`. + */ + export 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`. + */ + export 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. + */ + export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + export 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. + */ + export 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. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, 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`. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException, 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`. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + export function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, 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. + */ + export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export 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. + */ + export function writeSync(fd: number, buffer: Buffer | Uint8Array, 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. + */ + export 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. + */ + export function read(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export function readSync(fd: number, buffer: Buffer | Uint8Array, 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'`. + */ + export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, 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'`. + */ + export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, 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'`. + */ + export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException, 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. + */ + export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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'`. + */ + export 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'`. + */ + export 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'`. + */ + export 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'`. + */ + export 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'`. + */ + export 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'`. + */ + export function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; + + /** + * 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. + */ + export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => 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. + */ + export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export function __promisify__(path: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): 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. + */ + export function writeFileSync(path: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): 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. + */ + export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => 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. + */ + export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export function __promisify__(file: PathLike | number, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string } | string | null): 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. + */ + export function appendFileSync(file: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + */ + export 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_. + */ + export 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_. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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_. + */ + export 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_. + */ + export 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. + export 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_. + */ + export function existsSync(path: PathLike): boolean; + + export namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + export const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + export const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + export const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + export const X_OK: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + export const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + export const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + export const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + export 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. */ + export 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). */ + export 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. */ + export const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + export const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + export 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. */ + export const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + export const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + export 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. */ + export const O_DSYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + export const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + export const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + export 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. */ + export const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + export const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + export 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. */ + export 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. */ + export const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + export const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + export const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + export 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. */ + export const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + export const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + export const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + export 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. */ + export const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + export const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + export const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + export 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. */ + export const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + export const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + export const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + export const S_IXOTH: number; + + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + export const COPYFILE_EXCL: 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_. + */ + export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => 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_. + */ + export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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_. + */ + export 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_. + */ + export 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_. + */ + export 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_. + */ + export 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. + */ + export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + export 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. + */ + export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => 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. + */ + export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export 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. + */ + export 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. + */ + export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; +} + +declare module "path" { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + export 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; + } + export 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. + */ + export 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. + */ + export function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} paramter, 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export 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. + */ + export function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + export var sep: '\\' | '/'; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + export var delimiter: ';' | ':'; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + export function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + export function format(pathObject: FormatInputPathObject): string; + + export module posix { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: FormatInputPathObject): string; + } + + export module win32 { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: FormatInputPathObject): string; + } +} + +declare module "string_decoder" { + export interface NodeStringDecoder { + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } + export var StringDecoder: { + new(encoding?: string): NodeStringDecoder; + }; +} + +declare module "tls" { + import * as crypto from "crypto"; + import * as dns from "dns"; + import * as net from "net"; + import * as stream from "stream"; + + var CLIENT_RENEG_LIMIT: number; + var CLIENT_RENEG_WINDOW: number; + + export interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + export 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; + } + + export interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + + export interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export 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; + /** + * 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; + } + + export 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; + } + + export 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; + } + + export 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; + } + + export interface ClearTextStream extends stream.Duplex { + authorized: boolean; + authorizationError: Error; + getPeerCertificate(): any; + getCipher: { + name: string; + version: string; + }; + address: { + port: number; + family: string; + address: string; + }; + remoteAddress: string; + remotePort: number; + } + + export interface SecurePair { + encrypted: any; + cleartext: any; + } + + export 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; + 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; + } + + export 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. + */ + export function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + export function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): TLSSocket; + export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + export function createSecureContext(details: SecureContextOptions): SecureContext; + export function getCiphers(): string[]; + + export var DEFAULT_ECDH_CURVE: string; +} + +declare module "crypto" { + export interface Certificate { + exportChallenge(spkac: string | Buffer): Buffer; + exportPublicKey(spkac: string | Buffer): Buffer; + verifySpkac(spkac: Buffer): boolean; + } + export var Certificate: { + new(): Certificate; + (): Certificate; + }; + + export var fips: boolean; + + export interface CredentialDetails { + pfx: string; + key: string; + passphrase: string; + cert: string; + ca: string | string[]; + crl: string | string[]; + ciphers: string; + } + export interface Credentials { context?: any; } + export function createCredentials(details: CredentialDetails): Credentials; + export function createHash(algorithm: string): Hash; + export function createHmac(algorithm: string, key: string | Buffer): 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"; + + export interface Hash extends NodeJS.ReadWriteStream { + update(data: string | Buffer | DataView): Hash; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export interface Hmac extends NodeJS.ReadWriteStream { + update(data: string | Buffer | DataView): Hmac; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export function createCipher(algorithm: string, password: any): Cipher; + export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; + export interface Cipher extends NodeJS.ReadWriteStream { + update(data: Buffer | DataView): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Buffer | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; + 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; + } + export function createDecipher(algorithm: string, password: any): Decipher; + export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; + export interface Decipher extends NodeJS.ReadWriteStream { + update(data: Buffer | DataView): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Buffer | DataView, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; + 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): this; + setAAD(buffer: Buffer): this; + } + export function createSign(algorithm: string): Signer; + export interface Signer extends NodeJS.WritableStream { + update(data: string | Buffer | DataView): Signer; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: string | { key: string; passphrase: string }): Buffer; + sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + } + export function createVerify(algorith: string): Verify; + export interface Verify extends NodeJS.WritableStream { + update(data: string | Buffer | DataView): Verify; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: string | Object, signature: Buffer | 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 + } + export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; + export function createDiffieHellman(prime: Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + export interface DiffieHellman { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + 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): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + export function getDiffieHellman(group_name: string): DiffieHellman; + export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; + export function randomBytes(size: number): Buffer; + export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function pseudoRandomBytes(size: number): Buffer; + export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFillSync(buffer: Buffer | Uint8Array, offset?: number, size?: number): Buffer; + export function randomFill(buffer: Buffer, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, callback: (err: Error, buf: Uint8Array) => void): void; + export function randomFill(buffer: Buffer, offset: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, offset: number, callback: (err: Error, buf: Uint8Array) => void): void; + export function randomFill(buffer: Buffer, offset: number, size: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, offset: number, size: number, callback: (err: Error, buf: Uint8Array) => void): void; + export interface RsaPublicKey { + key: string; + padding?: number; + } + export interface RsaPrivateKey { + key: string; + passphrase?: string; + padding?: number; + } + export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer; + export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer; + export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer; + export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer; + export function getCiphers(): string[]; + export function getCurves(): string[]; + export function getHashes(): string[]; + export interface ECDH { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + export function createECDH(curve_name: string): ECDH; + export function timingSafeEqual(a: Buffer, b: Buffer): boolean; + export var DEFAULT_ENCODING: string; +} + +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + + namespace internal { + export class Stream extends internal { } + + export interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?: (this: Readable, size?: number) => any; + destroy?: (error?: Error) => any; + } + + export class Readable extends Stream implements NodeJS.ReadableStream { + readable: boolean; + readonly readableHighWaterMark: number; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + unpipe(destination?: T): this; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: string): boolean; + _destroy(err: Error, callback: Function): 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: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + + removeListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + } + + export interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + objectMode?: boolean; + write?: (chunk: any, encoding: string, callback: Function) => any; + writev?: (chunks: Array<{ chunk: any, encoding: string }>, callback: Function) => any; + destroy?: (error?: Error) => any; + final?: (callback: (error?: Error) => void) => void; + } + + export class Writable extends Stream implements NodeJS.WritableStream { + writable: boolean; + readonly writableHighWaterMark: number; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: Function): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): 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: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "drain", chunk: Buffer | string): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + + once(event: string, 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; + + prependListener(event: string, 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; + + prependOnceListener(event: string, 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; + + removeListener(event: string, 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; + } + + export interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + } + + // Note: Duplex extends both Readable and Writable. + export class Duplex extends Readable implements Writable { + writable: boolean; + readonly writableHighWaterMark: number; + constructor(opts?: DuplexOptions); + _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: Function): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + cork(): void; + uncork(): void; + } + + export interface TransformOptions extends DuplexOptions { + transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + flush?: (callback: Function) => any; + } + + export class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: string, callback: Function): void; + destroy(error?: Error): void; + } + + export class PassThrough extends Transform { } + } + + export = internal; +} + +declare module "util" { + export interface InspectOptions extends NodeJS.InspectOptions { } + export function format(format: any, ...param: any[]): string; + export function debug(string: string): void; + export function error(...param: any[]): void; + export function puts(...param: any[]): void; + export function print(...param: any[]): void; + export function log(string: string): void; + export var inspect: { + (object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + (object: any, options: InspectOptions): string; + colors: { + [color: string]: [number, number] | undefined + } + styles: { + [style: string]: string | undefined + } + defaultOptions: InspectOptions; + custom: symbol; + }; + export function isArray(object: any): object is any[]; + export function isRegExp(object: any): object is RegExp; + export function isDate(object: any): object is Date; + export function isError(object: any): object is Error; + export function inherits(constructor: any, superConstructor: any): void; + export function debuglog(key: string): (msg: string, ...param: any[]) => void; + export function isBoolean(object: any): object is boolean; + export function isBuffer(object: any): object is Buffer; + export function isFunction(object: any): boolean; + export function isNull(object: any): object is null; + export function isNullOrUndefined(object: any): object is null | undefined; + export function isNumber(object: any): object is number; + export function isObject(object: any): boolean; + export function isPrimitive(object: any): boolean; + export function isString(object: any): object is string; + export function isSymbol(object: any): object is symbol; + export function isUndefined(object: any): object is undefined; + export function deprecate(fn: T, message: string): T; + + export interface CustomPromisify extends Function { + __promisify__: TCustom; + } + + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export 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; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export 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; + export 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, result: TResult) => void) => void; + export 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; + export 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, result: TResult) => void) => void; + + export function promisify(fn: CustomPromisify): TCustom; + export function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err: Error | null) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export 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; + export 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; + export 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; + export 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; + export function promisify(fn: Function): Function; + export namespace promisify { + const custom: symbol; + } + + export class TextDecoder { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { fatal?: boolean; ignoreBOM?: boolean } + ); + decode( + input?: + Int8Array + | Int16Array + | Int32Array + | Uint8Array + | Uint16Array + | Uint32Array + | Uint8ClampedArray + | Float32Array + | Float64Array + | DataView + | ArrayBuffer + | null, + options?: { stream?: boolean } + ): string; + } + + export class TextEncoder { + readonly encoding: string; + constructor(); + encode(input?: string): Uint8Array; + } +} + +declare module "assert" { + function internal(value: any, message?: string): void; + namespace internal { + export class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFunction?: Function + }); + } + + export function fail(message: string): never; + export function fail(actual: any, expected: any, message?: string, operator?: string): never; + export function ok(value: any, message?: string): void; + export function equal(actual: any, expected: any, message?: string): void; + export function notEqual(actual: any, expected: any, message?: string): void; + export function deepEqual(actual: any, expected: any, message?: string): void; + export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function strictEqual(actual: any, expected: any, message?: string): void; + export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function deepStrictEqual(actual: any, expected: any, message?: string): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; + + export function throws(block: Function, message?: string): void; + export function throws(block: Function, error: Function, message?: string): void; + export function throws(block: Function, error: RegExp, message?: string): void; + export function throws(block: Function, error: (err: any) => boolean, message?: string): void; + + export function doesNotThrow(block: Function, message?: string): void; + export function doesNotThrow(block: Function, error: Function, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp, message?: string): void; + export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + + export function ifError(value: any): void; + } + + export = internal; +} + +declare module "tty" { + import * as net from "net"; + + export function isatty(fd: number): boolean; + export class ReadStream extends net.Socket { + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + export class WriteStream extends net.Socket { + columns: number; + rows: number; + isTTY: boolean; + } +} + +declare module "domain" { + import * as events from "events"; + + export 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; + dispose(): void; + members: any[]; + enter(): void; + exit(): void; + } + + export function create(): Domain; +} + +declare module "constants" { + export var E2BIG: number; + export var EACCES: number; + export var EADDRINUSE: number; + export var EADDRNOTAVAIL: number; + export var EAFNOSUPPORT: number; + export var EAGAIN: number; + export var EALREADY: number; + export var EBADF: number; + export var EBADMSG: number; + export var EBUSY: number; + export var ECANCELED: number; + export var ECHILD: number; + export var ECONNABORTED: number; + export var ECONNREFUSED: number; + export var ECONNRESET: number; + export var EDEADLK: number; + export var EDESTADDRREQ: number; + export var EDOM: number; + export var EEXIST: number; + export var EFAULT: number; + export var EFBIG: number; + export var EHOSTUNREACH: number; + export var EIDRM: number; + export var EILSEQ: number; + export var EINPROGRESS: number; + export var EINTR: number; + export var EINVAL: number; + export var EIO: number; + export var EISCONN: number; + export var EISDIR: number; + export var ELOOP: number; + export var EMFILE: number; + export var EMLINK: number; + export var EMSGSIZE: number; + export var ENAMETOOLONG: number; + export var ENETDOWN: number; + export var ENETRESET: number; + export var ENETUNREACH: number; + export var ENFILE: number; + export var ENOBUFS: number; + export var ENODATA: number; + export var ENODEV: number; + export var ENOENT: number; + export var ENOEXEC: number; + export var ENOLCK: number; + export var ENOLINK: number; + export var ENOMEM: number; + export var ENOMSG: number; + export var ENOPROTOOPT: number; + export var ENOSPC: number; + export var ENOSR: number; + export var ENOSTR: number; + export var ENOSYS: number; + export var ENOTCONN: number; + export var ENOTDIR: number; + export var ENOTEMPTY: number; + export var ENOTSOCK: number; + export var ENOTSUP: number; + export var ENOTTY: number; + export var ENXIO: number; + export var EOPNOTSUPP: number; + export var EOVERFLOW: number; + export var EPERM: number; + export var EPIPE: number; + export var EPROTO: number; + export var EPROTONOSUPPORT: number; + export var EPROTOTYPE: number; + export var ERANGE: number; + export var EROFS: number; + export var ESPIPE: number; + export var ESRCH: number; + export var ETIME: number; + export var ETIMEDOUT: number; + export var ETXTBSY: number; + export var EWOULDBLOCK: number; + export var EXDEV: number; + export var WSAEINTR: number; + export var WSAEBADF: number; + export var WSAEACCES: number; + export var WSAEFAULT: number; + export var WSAEINVAL: number; + export var WSAEMFILE: number; + export var WSAEWOULDBLOCK: number; + export var WSAEINPROGRESS: number; + export var WSAEALREADY: number; + export var WSAENOTSOCK: number; + export var WSAEDESTADDRREQ: number; + export var WSAEMSGSIZE: number; + export var WSAEPROTOTYPE: number; + export var WSAENOPROTOOPT: number; + export var WSAEPROTONOSUPPORT: number; + export var WSAESOCKTNOSUPPORT: number; + export var WSAEOPNOTSUPP: number; + export var WSAEPFNOSUPPORT: number; + export var WSAEAFNOSUPPORT: number; + export var WSAEADDRINUSE: number; + export var WSAEADDRNOTAVAIL: number; + export var WSAENETDOWN: number; + export var WSAENETUNREACH: number; + export var WSAENETRESET: number; + export var WSAECONNABORTED: number; + export var WSAECONNRESET: number; + export var WSAENOBUFS: number; + export var WSAEISCONN: number; + export var WSAENOTCONN: number; + export var WSAESHUTDOWN: number; + export var WSAETOOMANYREFS: number; + export var WSAETIMEDOUT: number; + export var WSAECONNREFUSED: number; + export var WSAELOOP: number; + export var WSAENAMETOOLONG: number; + export var WSAEHOSTDOWN: number; + export var WSAEHOSTUNREACH: number; + export var WSAENOTEMPTY: number; + export var WSAEPROCLIM: number; + export var WSAEUSERS: number; + export var WSAEDQUOT: number; + export var WSAESTALE: number; + export var WSAEREMOTE: number; + export var WSASYSNOTREADY: number; + export var WSAVERNOTSUPPORTED: number; + export var WSANOTINITIALISED: number; + export var WSAEDISCON: number; + export var WSAENOMORE: number; + export var WSAECANCELLED: number; + export var WSAEINVALIDPROCTABLE: number; + export var WSAEINVALIDPROVIDER: number; + export var WSAEPROVIDERFAILEDINIT: number; + export var WSASYSCALLFAILURE: number; + export var WSASERVICE_NOT_FOUND: number; + export var WSATYPE_NOT_FOUND: number; + export var WSA_E_NO_MORE: number; + export var WSA_E_CANCELLED: number; + export var WSAEREFUSED: number; + export var SIGHUP: number; + export var SIGINT: number; + export var SIGILL: number; + export var SIGABRT: number; + export var SIGFPE: number; + export var SIGKILL: number; + export var SIGSEGV: number; + export var SIGTERM: number; + export var SIGBREAK: number; + export var SIGWINCH: number; + export var SSL_OP_ALL: number; + export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + export var SSL_OP_CIPHER_SERVER_PREFERENCE: number; + export var SSL_OP_CISCO_ANYCONNECT: number; + export var SSL_OP_COOKIE_EXCHANGE: number; + export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + export var SSL_OP_EPHEMERAL_RSA: number; + export var SSL_OP_LEGACY_SERVER_CONNECT: number; + export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + export var SSL_OP_MICROSOFT_SESS_ID_BUG: number; + export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + export var SSL_OP_NETSCAPE_CA_DN_BUG: number; + export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NO_COMPRESSION: number; + export var SSL_OP_NO_QUERY_MTU: number; + export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + export var SSL_OP_NO_SSLv2: number; + export var SSL_OP_NO_SSLv3: number; + export var SSL_OP_NO_TICKET: number; + export var SSL_OP_NO_TLSv1: number; + export var SSL_OP_NO_TLSv1_1: number; + export var SSL_OP_NO_TLSv1_2: number; + export var SSL_OP_PKCS1_CHECK_1: number; + export var SSL_OP_PKCS1_CHECK_2: number; + export var SSL_OP_SINGLE_DH_USE: number; + export var SSL_OP_SINGLE_ECDH_USE: number; + export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + export var SSL_OP_TLS_BLOCK_PADDING_BUG: number; + export var SSL_OP_TLS_D5_BUG: number; + export var SSL_OP_TLS_ROLLBACK_BUG: number; + export var ENGINE_METHOD_DSA: number; + export var ENGINE_METHOD_DH: number; + export var ENGINE_METHOD_RAND: number; + export var ENGINE_METHOD_ECDH: number; + export var ENGINE_METHOD_ECDSA: number; + export var ENGINE_METHOD_CIPHERS: number; + export var ENGINE_METHOD_DIGESTS: number; + export var ENGINE_METHOD_STORE: number; + export var ENGINE_METHOD_PKEY_METHS: number; + export var ENGINE_METHOD_PKEY_ASN1_METHS: number; + export var ENGINE_METHOD_ALL: number; + export var ENGINE_METHOD_NONE: number; + export var DH_CHECK_P_NOT_SAFE_PRIME: number; + export var DH_CHECK_P_NOT_PRIME: number; + export var DH_UNABLE_TO_CHECK_GENERATOR: number; + export var DH_NOT_SUITABLE_GENERATOR: number; + export var NPN_ENABLED: number; + export var RSA_PKCS1_PADDING: number; + export var RSA_SSLV23_PADDING: number; + export var RSA_NO_PADDING: number; + export var RSA_PKCS1_OAEP_PADDING: number; + export var RSA_X931_PADDING: number; + export var RSA_PKCS1_PSS_PADDING: number; + export var POINT_CONVERSION_COMPRESSED: number; + export var POINT_CONVERSION_UNCOMPRESSED: number; + export var POINT_CONVERSION_HYBRID: number; + export var O_RDONLY: number; + export var O_WRONLY: number; + export var O_RDWR: number; + export var S_IFMT: number; + export var S_IFREG: number; + export var S_IFDIR: number; + export var S_IFCHR: number; + export var S_IFBLK: number; + export var S_IFIFO: number; + export var S_IFSOCK: number; + export var S_IRWXU: number; + export var S_IRUSR: number; + export var S_IWUSR: number; + export var S_IXUSR: number; + export var S_IRWXG: number; + export var S_IRGRP: number; + export var S_IWGRP: number; + export var S_IXGRP: number; + export var S_IRWXO: number; + export var S_IROTH: number; + export var S_IWOTH: number; + export var S_IXOTH: number; + export var S_IFLNK: number; + export var O_CREAT: number; + export var O_EXCL: number; + export var O_NOCTTY: number; + export var O_DIRECTORY: number; + export var O_NOATIME: number; + export var O_NOFOLLOW: number; + export var O_SYNC: number; + export var O_DSYNC: number; + export var O_SYMLINK: number; + export var O_DIRECT: number; + export var O_NONBLOCK: number; + export var O_TRUNC: number; + export var O_APPEND: number; + export var F_OK: number; + export var R_OK: number; + export var W_OK: number; + export var X_OK: number; + export var UV_UDP_REUSEADDR: number; + export var SIGQUIT: number; + export var SIGTRAP: number; + export var SIGIOT: number; + export var SIGBUS: number; + export var SIGUSR1: number; + export var SIGUSR2: number; + export var SIGPIPE: number; + export var SIGALRM: number; + export var SIGCHLD: number; + export var SIGSTKFLT: number; + export var SIGCONT: number; + export var SIGSTOP: number; + export var SIGTSTP: number; + export var SIGTTIN: number; + export var SIGTTOU: number; + export var SIGURG: number; + export var SIGXCPU: number; + export var SIGXFSZ: number; + export var SIGVTALRM: number; + export var SIGPROF: number; + export var SIGIO: number; + export var SIGPOLL: number; + export var SIGPWR: number; + export var SIGSYS: number; + export var SIGUNUSED: number; + export var defaultCoreCipherList: string; + export var defaultCipherList: string; + export var ENGINE_METHOD_RSA: number; + export var ALPN_ENABLED: number; +} + +declare module "module" { + export = NodeJS.Module; +} + +declare module "process" { + export = process; +} + +// tslint:disable-next-line:no-declare-current-package +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; + } + + export function getHeapStatistics(): HeapInfo; + export function getHeapSpaceStatistics(): HeapSpaceInfo[]; + export function setFlagsFromString(flags: string): void; +} + +declare module "timers" { + export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; + } + export function clearTimeout(timeoutId: NodeJS.Timer): void; + export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearInterval(intervalId: NodeJS.Timer): void; + export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + export namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; + } + export function clearImmediate(immediateId: any): void; +} + +declare module "console" { + export = console; +} + +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module "async_hooks" { + /** + * Returns the asyncId of the current execution context. + */ + export function executionAsyncId(): number; + /// @deprecated - replaced by executionAsyncId() + export function currentId(): number; + + /** + * Returns the ID of the resource responsible for calling the callback that is currently being executed. + */ + export function triggerAsyncId(): number; + /// @deprecated - replaced by triggerAsyncId() + export function triggerId(): number; + + export 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; + } + + export 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 + */ + export function createHook(options: HookCallbacks): AsyncHook; + + export 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. + */ + export 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 8.10) + */ + constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); + + /** + * Call AsyncHooks before callbacks. + */ + emitBefore(): void; + + /** + * Call AsyncHooks after callbacks + */ + emitAfter(): void; + + /** + * 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; + } +} + +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, OutgoingHttpHeaders } from "http"; + export { IncomingHttpHeaders, OutgoingHttpHeaders } from "http"; + + // 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; + getTrailers?: (trailers: OutgoingHttpHeaders) => void; + } + + 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 destroyed: boolean; + priority(options: StreamPriorityOptions): void; + readonly rstCode: number; + rstStream(code: number): void; + rstWithNoError(): void; + rstWithProtocolError(): void; + rstWithCancel(): void; + rstWithRefuse(): void; + rstWithInternalError(): void; + readonly session: Http2Session; + setTimeout(msecs: number, callback?: () => void): void; + readonly state: StreamState; + + 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; + + 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; + + 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; + + 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; + + 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; + + 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; + } + + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "headers", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + } + + export interface ServerHttp2Stream extends Http2Stream { + additionalHeaders(headers: OutgoingHttpHeaders): void; + readonly headersSent: boolean; + readonly pushAllowed: boolean; + pushStream(headers: OutgoingHttpHeaders, callback?: (pushStream: ServerHttp2Stream) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (pushStream: ServerHttp2Stream) => 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 SessionShutdownOptions { + graceful?: boolean; + errorCode?: number; + lastStreamID?: number; + opaqueData?: Buffer | Uint8Array; + } + + 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 { + destroy(): void; + readonly destroyed: boolean; + readonly localSettings: Settings; + readonly pendingSettingsAck: boolean; + readonly remoteSettings: Settings; + rstStream(stream: Http2Stream, code?: number): void; + setTimeout(msecs: number, callback?: () => void): void; + shutdown(callback?: () => void): void; + shutdown(options: SessionShutdownOptions, 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; + + 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: "socketError", listener: (err: Error) => void): this; + addListener(event: "timeout", 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: "socketError", err: Error): boolean; + emit(event: "timeout"): 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: "socketError", listener: (err: Error) => void): this; + on(event: "timeout", 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: "socketError", listener: (err: Error) => void): this; + once(event: "timeout", 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: "socketError", listener: (err: Error) => void): this; + prependListener(event: "timeout", 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: "socketError", listener: (err: Error) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + export interface ClientHttp2Session extends Http2Session { + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + } + + export interface ServerHttp2Session extends Http2Session { + 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; + } + + 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 { + allowHTTP1?: boolean; + } + + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean; + } + + export interface Http2Server extends net.Server { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "socketError", 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: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "socketError", 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: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "socketError", 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: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "socketError", 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 interface Http2ServerRequest extends stream.Readable { + 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 interface Http2ServerResponse extends events.EventEmitter { + 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 { + export const NGHTTP2_SESSION_SERVER: number; + export const NGHTTP2_SESSION_CLIENT: number; + export const NGHTTP2_STREAM_STATE_IDLE: number; + export const NGHTTP2_STREAM_STATE_OPEN: number; + export const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + export const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + export const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + export const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + export const NGHTTP2_STREAM_STATE_CLOSED: number; + export const NGHTTP2_NO_ERROR: number; + export const NGHTTP2_PROTOCOL_ERROR: number; + export const NGHTTP2_INTERNAL_ERROR: number; + export const NGHTTP2_FLOW_CONTROL_ERROR: number; + export const NGHTTP2_SETTINGS_TIMEOUT: number; + export const NGHTTP2_STREAM_CLOSED: number; + export const NGHTTP2_FRAME_SIZE_ERROR: number; + export const NGHTTP2_REFUSED_STREAM: number; + export const NGHTTP2_CANCEL: number; + export const NGHTTP2_COMPRESSION_ERROR: number; + export const NGHTTP2_CONNECT_ERROR: number; + export const NGHTTP2_ENHANCE_YOUR_CALM: number; + export const NGHTTP2_INADEQUATE_SECURITY: number; + export const NGHTTP2_HTTP_1_1_REQUIRED: number; + export const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + export const NGHTTP2_FLAG_NONE: number; + export const NGHTTP2_FLAG_END_STREAM: number; + export const NGHTTP2_FLAG_END_HEADERS: number; + export const NGHTTP2_FLAG_ACK: number; + export const NGHTTP2_FLAG_PADDED: number; + export const NGHTTP2_FLAG_PRIORITY: number; + export const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + export const DEFAULT_SETTINGS_ENABLE_PUSH: number; + export const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + export const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + export const MAX_MAX_FRAME_SIZE: number; + export const MIN_MAX_FRAME_SIZE: number; + export const MAX_INITIAL_WINDOW_SIZE: number; + export const NGHTTP2_DEFAULT_WEIGHT: number; + export const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + export const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + export const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + export const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + export const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + export const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + export const PADDING_STRATEGY_NONE: number; + export const PADDING_STRATEGY_MAX: number; + export const PADDING_STRATEGY_CALLBACK: number; + export const HTTP2_HEADER_STATUS: string; + export const HTTP2_HEADER_METHOD: string; + export const HTTP2_HEADER_AUTHORITY: string; + export const HTTP2_HEADER_SCHEME: string; + export const HTTP2_HEADER_PATH: string; + export const HTTP2_HEADER_ACCEPT_CHARSET: string; + export const HTTP2_HEADER_ACCEPT_ENCODING: string; + export const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + export const HTTP2_HEADER_ACCEPT_RANGES: string; + export const HTTP2_HEADER_ACCEPT: string; + export const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + export const HTTP2_HEADER_AGE: string; + export const HTTP2_HEADER_ALLOW: string; + export const HTTP2_HEADER_AUTHORIZATION: string; + export const HTTP2_HEADER_CACHE_CONTROL: string; + export const HTTP2_HEADER_CONNECTION: string; + export const HTTP2_HEADER_CONTENT_DISPOSITION: string; + export const HTTP2_HEADER_CONTENT_ENCODING: string; + export const HTTP2_HEADER_CONTENT_LANGUAGE: string; + export const HTTP2_HEADER_CONTENT_LENGTH: string; + export const HTTP2_HEADER_CONTENT_LOCATION: string; + export const HTTP2_HEADER_CONTENT_MD5: string; + export const HTTP2_HEADER_CONTENT_RANGE: string; + export const HTTP2_HEADER_CONTENT_TYPE: string; + export const HTTP2_HEADER_COOKIE: string; + export const HTTP2_HEADER_DATE: string; + export const HTTP2_HEADER_ETAG: string; + export const HTTP2_HEADER_EXPECT: string; + export const HTTP2_HEADER_EXPIRES: string; + export const HTTP2_HEADER_FROM: string; + export const HTTP2_HEADER_HOST: string; + export const HTTP2_HEADER_IF_MATCH: string; + export const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + export const HTTP2_HEADER_IF_NONE_MATCH: string; + export const HTTP2_HEADER_IF_RANGE: string; + export const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + export const HTTP2_HEADER_LAST_MODIFIED: string; + export const HTTP2_HEADER_LINK: string; + export const HTTP2_HEADER_LOCATION: string; + export const HTTP2_HEADER_MAX_FORWARDS: string; + export const HTTP2_HEADER_PREFER: string; + export const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + export const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + export const HTTP2_HEADER_RANGE: string; + export const HTTP2_HEADER_REFERER: string; + export const HTTP2_HEADER_REFRESH: string; + export const HTTP2_HEADER_RETRY_AFTER: string; + export const HTTP2_HEADER_SERVER: string; + export const HTTP2_HEADER_SET_COOKIE: string; + export const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + export const HTTP2_HEADER_TRANSFER_ENCODING: string; + export const HTTP2_HEADER_TE: string; + export const HTTP2_HEADER_UPGRADE: string; + export const HTTP2_HEADER_USER_AGENT: string; + export const HTTP2_HEADER_VARY: string; + export const HTTP2_HEADER_VIA: string; + export const HTTP2_HEADER_WWW_AUTHENTICATE: string; + export const HTTP2_HEADER_HTTP2_SETTINGS: string; + export const HTTP2_HEADER_KEEP_ALIVE: string; + export const HTTP2_HEADER_PROXY_CONNECTION: string; + export const HTTP2_METHOD_ACL: string; + export const HTTP2_METHOD_BASELINE_CONTROL: string; + export const HTTP2_METHOD_BIND: string; + export const HTTP2_METHOD_CHECKIN: string; + export const HTTP2_METHOD_CHECKOUT: string; + export const HTTP2_METHOD_CONNECT: string; + export const HTTP2_METHOD_COPY: string; + export const HTTP2_METHOD_DELETE: string; + export const HTTP2_METHOD_GET: string; + export const HTTP2_METHOD_HEAD: string; + export const HTTP2_METHOD_LABEL: string; + export const HTTP2_METHOD_LINK: string; + export const HTTP2_METHOD_LOCK: string; + export const HTTP2_METHOD_MERGE: string; + export const HTTP2_METHOD_MKACTIVITY: string; + export const HTTP2_METHOD_MKCALENDAR: string; + export const HTTP2_METHOD_MKCOL: string; + export const HTTP2_METHOD_MKREDIRECTREF: string; + export const HTTP2_METHOD_MKWORKSPACE: string; + export const HTTP2_METHOD_MOVE: string; + export const HTTP2_METHOD_OPTIONS: string; + export const HTTP2_METHOD_ORDERPATCH: string; + export const HTTP2_METHOD_PATCH: string; + export const HTTP2_METHOD_POST: string; + export const HTTP2_METHOD_PRI: string; + export const HTTP2_METHOD_PROPFIND: string; + export const HTTP2_METHOD_PROPPATCH: string; + export const HTTP2_METHOD_PUT: string; + export const HTTP2_METHOD_REBIND: string; + export const HTTP2_METHOD_REPORT: string; + export const HTTP2_METHOD_SEARCH: string; + export const HTTP2_METHOD_TRACE: string; + export const HTTP2_METHOD_UNBIND: string; + export const HTTP2_METHOD_UNCHECKOUT: string; + export const HTTP2_METHOD_UNLINK: string; + export const HTTP2_METHOD_UNLOCK: string; + export const HTTP2_METHOD_UPDATE: string; + export const HTTP2_METHOD_UPDATEREDIRECTREF: string; + export const HTTP2_METHOD_VERSION_CONTROL: string; + export const HTTP_STATUS_CONTINUE: number; + export const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + export const HTTP_STATUS_PROCESSING: number; + export const HTTP_STATUS_OK: number; + export const HTTP_STATUS_CREATED: number; + export const HTTP_STATUS_ACCEPTED: number; + export const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + export const HTTP_STATUS_NO_CONTENT: number; + export const HTTP_STATUS_RESET_CONTENT: number; + export const HTTP_STATUS_PARTIAL_CONTENT: number; + export const HTTP_STATUS_MULTI_STATUS: number; + export const HTTP_STATUS_ALREADY_REPORTED: number; + export const HTTP_STATUS_IM_USED: number; + export const HTTP_STATUS_MULTIPLE_CHOICES: number; + export const HTTP_STATUS_MOVED_PERMANENTLY: number; + export const HTTP_STATUS_FOUND: number; + export const HTTP_STATUS_SEE_OTHER: number; + export const HTTP_STATUS_NOT_MODIFIED: number; + export const HTTP_STATUS_USE_PROXY: number; + export const HTTP_STATUS_TEMPORARY_REDIRECT: number; + export const HTTP_STATUS_PERMANENT_REDIRECT: number; + export const HTTP_STATUS_BAD_REQUEST: number; + export const HTTP_STATUS_UNAUTHORIZED: number; + export const HTTP_STATUS_PAYMENT_REQUIRED: number; + export const HTTP_STATUS_FORBIDDEN: number; + export const HTTP_STATUS_NOT_FOUND: number; + export const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + export const HTTP_STATUS_NOT_ACCEPTABLE: number; + export const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + export const HTTP_STATUS_REQUEST_TIMEOUT: number; + export const HTTP_STATUS_CONFLICT: number; + export const HTTP_STATUS_GONE: number; + export const HTTP_STATUS_LENGTH_REQUIRED: number; + export const HTTP_STATUS_PRECONDITION_FAILED: number; + export const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + export const HTTP_STATUS_URI_TOO_LONG: number; + export const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + export const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + export const HTTP_STATUS_EXPECTATION_FAILED: number; + export const HTTP_STATUS_TEAPOT: number; + export const HTTP_STATUS_MISDIRECTED_REQUEST: number; + export const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + export const HTTP_STATUS_LOCKED: number; + export const HTTP_STATUS_FAILED_DEPENDENCY: number; + export const HTTP_STATUS_UNORDERED_COLLECTION: number; + export const HTTP_STATUS_UPGRADE_REQUIRED: number; + export const HTTP_STATUS_PRECONDITION_REQUIRED: number; + export const HTTP_STATUS_TOO_MANY_REQUESTS: number; + export const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + export const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + export const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + export const HTTP_STATUS_NOT_IMPLEMENTED: number; + export const HTTP_STATUS_BAD_GATEWAY: number; + export const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + export const HTTP_STATUS_GATEWAY_TIMEOUT: number; + export const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + export const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + export const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + export const HTTP_STATUS_LOOP_DETECTED: number; + export const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + export const HTTP_STATUS_NOT_EXTENDED: number; + export 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; +} + +declare module "perf_hooks" { + export 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; + } + + export 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; + } + + export 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; + } + + export 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[]; + } + + export type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + + export class PerformanceObserver { + 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; + } + + export namespace constants { + export const NODE_PERFORMANCE_GC_MAJOR: number; + export const NODE_PERFORMANCE_GC_MINOR: number; + export const NODE_PERFORMANCE_GC_INCREMENTAL: number; + export const NODE_PERFORMANCE_GC_WEAKCB: number; + } + + const performance: Performance; +} diff --git a/app/node_modules/@types/node/inspector.d.ts b/app/node_modules/@types/node/inspector.d.ts new file mode 100644 index 00000000..955239b4 --- /dev/null +++ b/app/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,2488 @@ +// 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'; + + export interface InspectorNotification { + method: string; + params: T; + } + + export namespace Schema { + /** + * Description of the protocol domain. + */ + export interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + export interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Schema.Domain[]; + } + } + + export namespace Runtime { + /** + * Unique script identifier. + */ + export type ScriptId = string; + + /** + * Unique object identifier. + */ + export type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. + */ + export type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + export 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?: Runtime.UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: Runtime.RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: Runtime.ObjectPreview; + /** + * @experimental + */ + customPreview?: Runtime.CustomPreview; + } + + /** + * @experimental + */ + export interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: Runtime.RemoteObjectId; + bindRemoteObjectFunctionId: Runtime.RemoteObjectId; + configObjectId?: Runtime.RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + export 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: Runtime.PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: Runtime.EntryPreview[]; + } + + /** + * @experimental + */ + export 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?: Runtime.ObjectPreview; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + export interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: Runtime.ObjectPreview; + /** + * Preview of the value. + */ + value: Runtime.ObjectPreview; + } + + /** + * Object property descriptor. + */ + export interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.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?: Runtime.RemoteObject; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: Runtime.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?: Runtime.RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + export interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.RemoteObject; + } + + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + export interface CallArgument { + /** + * Primitive value. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: Runtime.UnserializableValue; + /** + * Remote object handle. + */ + objectId?: Runtime.RemoteObjectId; + } + + /** + * Id of an execution context. + */ + export type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + export interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: Runtime.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. + */ + export 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?: Runtime.ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: Runtime.StackTrace; + /** + * Exception object if available. + */ + exception?: Runtime.RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: Runtime.ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + export type Timestamp = number; + + /** + * Stack entry for runtime errors and assertions. + */ + export interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: Runtime.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. + */ + export 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: Runtime.CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: Runtime.StackTrace; + /** + * Creation frame of the Promise which produced the next synchronous trace when resolved, if available. + * @experimental + */ + promiseCreationFrame?: Runtime.CallFrame; + } + + export 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?: Runtime.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. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: Runtime.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; + } + + export interface CallFunctionOnParameterType { + /** + * Identifier of the object to call function on. + */ + objectId: Runtime.RemoteObjectId; + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: Runtime.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. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: Runtime.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; + } + + export interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + export interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + export 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?: Runtime.ExecutionContextId; + } + + export interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: Runtime.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?: Runtime.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 wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: Runtime.RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: Runtime.PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: Runtime.InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: Runtime.ScriptId; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RunScriptReturnType { + /** + * Run result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: Runtime.ExecutionContextDescription; + } + + export interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: Runtime.ExecutionContextId; + } + + export interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Runtime.Timestamp; + exceptionDetails: Runtime.ExceptionDetails; + } + + export interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionUnhandled. + */ + exceptionId: number; + } + + export interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: Runtime.RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Runtime.Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: Runtime.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; + } + + export interface InspectRequestedEventDataType { + object: Runtime.RemoteObject; + hints: {}; + } + } + + export namespace Debugger { + /** + * Breakpoint identifier. + */ + export type BreakpointId = string; + + /** + * Call frame identifier. + */ + export type CallFrameId = string; + + /** + * Location in the source code. + */ + export 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 + */ + export interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + export interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: Debugger.CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + * @experimental + */ + functionLocation?: Debugger.Location; + /** + * Location in the source code. + */ + location: Debugger.Location; + /** + * Scope chain for this call frame. + */ + scopeChain: Debugger.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. + */ + export 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?: Debugger.Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Debugger.Location; + } + + /** + * Search match for resource. + * @experimental + */ + export interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + /** + * @experimental + */ + export 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; + } + + export interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + export interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + export 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; + /** + * 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; + } + + export interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Debugger.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; + } + + export interface RemoveBreakpointParameterType { + breakpointId: Debugger.BreakpointId; + } + + export interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Debugger.Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Debugger.Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + export interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Debugger.Location; + /** + * @experimental + */ + targetCallFrames?: string; + } + + export 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; + } + + export 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; + } + + export interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.CallFrameId; + } + + export interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + export interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + export interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.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. + * @experimental + */ + throwOnSideEffect?: boolean; + } + + export 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: Debugger.CallFrameId; + } + + export interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + + export interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + export interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: Debugger.ScriptPosition[]; + } + + export interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Debugger.Location[]; + } + + export interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Debugger.Location; + } + + export interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: Debugger.BreakLocation[]; + } + + export interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: Debugger.SearchMatch[]; + } + + export interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: Debugger.CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: Debugger.CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + } + + export interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + export interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export 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. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export 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. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: Debugger.BreakpointId; + /** + * Actual breakpoint location. + */ + location: Debugger.Location; + } + + export interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: Debugger.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; + } + } + + export namespace Console { + /** + * Console message. + */ + export 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; + } + + export interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: Console.ConsoleMessage; + } + } + + export namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + export 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. + * @experimental + */ + 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. + * @experimental + */ + positionTicks?: Profiler.PositionTickInfo[]; + } + + /** + * Profile. + */ + export interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: Profiler.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. + * @experimental + */ + export 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. + * @experimental + */ + export 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. + * @experimental + */ + export interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: Profiler.CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + + /** + * Coverage data for a JavaScript script. + * @experimental + */ + export 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: Profiler.FunctionCoverage[]; + } + + export interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + export interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + } + + export interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profiler.Profile; + } + + export interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + export interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profiler.Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + export namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + export type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + export interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: HeapProfiler.SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + export interface SamplingHeapProfile { + head: HeapProfiler.SamplingHeapProfileNode; + } + + export interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + export interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean; + } + + export interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + export interface GetObjectByHeapObjectIdParameterType { + objectId: HeapProfiler.HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + export interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number; + } + + export interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + export interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: HeapProfiler.SamplingHeapProfile; + } + + export interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + export interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + + export interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + export 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[]; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + /** + * 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) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + * @experimental + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * Searches for given string in script content. + * @experimental + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + * @experimental + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + * @experimental + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + * @experimental + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + * @experimental + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + } + + // 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. + */ + export function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + export function close(): void; + + /** + * Return the URL of the active inspector, or undefined if there is none. + */ + export function url(): string; +} diff --git a/app/node_modules/@types/node/package.json b/app/node_modules/@types/node/package.json new file mode 100644 index 00000000..0a7ee3a5 --- /dev/null +++ b/app/node_modules/@types/node/package.json @@ -0,0 +1,139 @@ +{ + "_args": [ + [ + "@types/node@8.10.16", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "@types/node@8.10.16", + "_id": "@types/node@8.10.16", + "_inBundle": false, + "_integrity": "sha512-KlK7YiZXSY8E6v8E4+cCor9IT071bfZrfYqKf0SEj8SJ0Qk4DEz1sgL02Wt6mebNNM9d7870PEoJRHAsUcJPrw==", + "_location": "/@types/node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/node@8.10.16", + "name": "@types/node", + "escapedName": "@types%2fnode", + "scope": "@types", + "rawSpec": "8.10.16", + "saveSpec": null, + "fetchSpec": "8.10.16" + }, + "_requiredBy": [ + "/electron" + ], + "_resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.16.tgz", + "_spec": "8.10.16", + "_where": "/home/s2/Documents/Code/gitlit/app", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git/issues" + }, + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "http://typescriptlang.org" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs" + }, + { + "name": "Christian Vaagland Tellnes", + "url": "https://github.com/tellnes" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "Nicolas Voigt", + "url": "https://github.com/octo-sniffle" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89" + }, + { + "name": "Flarna", + "url": "https://github.com/Flarna" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis" + }, + { + "name": "Oliver Joseph Ash", + "url": "https://github.com/OliverJAsh" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e" + }, + { + "name": "Bruno Scheufler", + "url": "https://github.com/brunoscheufler" + }, + { + "name": "Hoàng Văn Khải", + "url": "https://github.com/KSXGitHub" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped.git#readme", + "license": "MIT", + "main": "", + "name": "@types/node", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" + }, + "scripts": {}, + "typeScriptVersion": "2.1", + "typesPublisherContentHash": "92cc76e1b770b90fa672222d2a679b5c917de209afe3a70d05167765bbfebdb0", + "version": "8.10.16" +} diff --git a/app/node_modules/abbrev/package.json b/app/node_modules/abbrev/package.json index 784514d8..2577fc8f 100644 --- a/app/node_modules/abbrev/package.json +++ b/app/node_modules/abbrev/package.json @@ -1,28 +1,34 @@ { - "_from": "abbrev@1", + "_args": [ + [ + "abbrev@1.1.1", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "abbrev@1.1.1", "_id": "abbrev@1.1.1", "_inBundle": false, "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "_location": "/abbrev", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "abbrev@1", + "raw": "abbrev@1.1.1", "name": "abbrev", "escapedName": "abbrev", - "rawSpec": "1", + "rawSpec": "1.1.1", "saveSpec": null, - "fetchSpec": "1" + "fetchSpec": "1.1.1" }, "_requiredBy": [ "/nopt", "/touch/nopt" ], "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", - "_spec": "abbrev@1", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\nopt", + "_spec": "1.1.1", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -30,8 +36,6 @@ "bugs": { "url": "https://github.com/isaacs/abbrev-js/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Like ruby's abbrev module, but in js", "devDependencies": { "tap": "^10.1" diff --git a/app/node_modules/ajv/.tonic_example.js b/app/node_modules/ajv/.tonic_example.js new file mode 100644 index 00000000..aa11812d --- /dev/null +++ b/app/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/app/node_modules/ajv/LICENSE b/app/node_modules/ajv/LICENSE new file mode 100644 index 00000000..81053968 --- /dev/null +++ b/app/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Evgeny Poberezkin + +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/app/node_modules/ajv/README.md b/app/node_modules/ajv/README.md new file mode 100644 index 00000000..387c81d8 --- /dev/null +++ b/app/node_modules/ajv/README.md @@ -0,0 +1,1327 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser with draft 6 support. + + +[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm@beta](https://img.shields.io/npm/v/ajv/beta.svg)](https://github.com/epoberezkin/ajv/tree/beta) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install. + + +## Using version 5 + +[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published. + +[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas). + +__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Related packages](#related-packages) +- [Packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, History, License](#tests) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft 6](http://json-schema.org/) and draft 4 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-8.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-6 keywords `const`, `contains` and `propertyNames` +- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + +Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). + + +## Install + +``` +npm install ajv +``` + +or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta): + +``` +npm install ajv@beta +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: + +- compiling JSON-schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON-schema +- testing expected validity of data against JSON-schema +- referenced schemas +- custom meta-schemas +- files in JSON and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft 4 of JSON-schema standard: + +- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf + +With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard: + +- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-proposed) - conditional validation with a sequence of if/then clauses +- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. + + +## Formats + +The following formats are supported for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full uri with optional protocol. +- _url_: [URL record](https://url.spec.whatwg.org/#concept-url). +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. + +You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle). + +Async functions are currently supported in Chrome 55, Firefox 52, Node.js 7 (with --harmony-async-await) and MS Edge 13 (with flag). + +Generator functions are currently supported in Chrome, Firefox and Node.js. + +If you are using Ajv in other browsers or in older versions of Node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +/** + * Default mode is non-transpiled generator function wrapped with `co`. + * Using package ajv-async (https://github.com/epoberezkin/ajv-async) + * you can auto-detect the best async mode. + * In this case, without "async" and "transpile" options + * (or with option {async: true}) + * Ajv will choose the first supported/installed option in this order: + * 1. native async function + * 2. native generator function wrapped with co + * 3. es7 async functions transpiled with nodent + * 4. es7 async functions transpiled with regenerator + */ + +var setupAsync = require('ajv-async'); +var ajv = setupAsync(new Ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +To use a transpiler you should separately install it (or load its bundle in the browser). + +Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder. + + +#### Using nodent + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install nodent` or use `nodent.min.js` from dist folder of npm package. + + +#### Using regenerator + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package. + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ async: 'es7', processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +#### Comparison of async modes + +|mode|transpile
speed*|run-time
speed*|bundle
size| +|---|:-:|:-:|:-:| +|es7 async
(native)|-|0.75|-| +|generators
(native)|-|1.0|-| +|es7.nodent|1.35|1.1|215Kb| +|es7.regenerator|1.0|2.7|1109Kb| +|regenerator|1.0|3.2|1109Kb| + +\* Relative performance in Node.js 7.x — smaller is better. + +[nodent](https://github.com/MatAtBread/nodent) has several advantages: + +- much smaller browser bundle than regenerator +- almost the same performance of generated code as native generators in Node.js and the latest Chrome +- much better performance than native generators in other browsers +- works in IE 9 (regenerator does not) + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +This option modifies original data. + +__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema. + +If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`. + +Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +Example 3 (inserting "defaults" by reference): + +```javascript +var ajv = new Ajv({ useDefaults: 'shared' }); + +var schema = { + properties: { + foo: { + default: { bar: 1 } + } + } +} + +var validate = ajv.compile(schema); + +var data = {}; +console.log(validate(data)); // true +console.log(data); // { foo: { bar: 1 } } + +data.foo.bar = 2; + +var data2 = {}; +console.log(validate(data2)); // true +console.log(data2); // { foo: { bar: 2 } } +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema. + +Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft 6 meta schema (http://json-schema.org/draft-06/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _modifying_: `true` MUST be passed if keyword modifies data +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + jsonPointers: false, + uniqueItems: true, + unicode: true, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: undefined // recommended '$id' + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // asynchronous validation options: + async: 'co*', + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (safer and slower, object literal is used). + - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Asynchronous validation options + +- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values: + - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled. + - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode` or `transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by: + - Firefox 52, + - Chrome 55, + - Node.js 7 (with `--harmony-async-await`), + - MS Edge 13 (with flag). + - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If `transpile` option is not passed, ajv-async will choose the first of supported/installed async/transpile modes in this order: + - "es7" (native async functions), + - "co*" (native generators with co.wrap), + - "es7"/"nodent", + - "co*"/"regenerator" during the creation of the Ajv instance. + + If none of the options is available the exception will be thrown. +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode. + - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown. + - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +## Related packages + +- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages +- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.) +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch +- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions + + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/epoberezkin/ajv/releases + +__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). + +[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0). + +[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). + +[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). + +[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). + + +## License + +[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/app/node_modules/ajv/lib/$data.js b/app/node_modules/ajv/lib/$data.js new file mode 100644 index 00000000..60cfc2d8 --- /dev/null +++ b/app/node_modules/ajv/lib/$data.js @@ -0,0 +1,49 @@ +'use strict'; + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i; + /** + * Create validating function for passed schema. + * @param {object|Boolean} schema schema object + * @return {Function} validating function + */ + compile(schema: object | boolean): ValidateFunction; + /** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and node-style callback. + * @this Ajv + * @param {object|Boolean} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. + * @return {Thenable} validating function + */ + compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable; + /** + * Adds schema to the instance. + * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @return {Ajv} this for method chaining + */ + addSchema(schema: Array | object, key?: string): Ajv; + /** + * Add schema that will be used to validate other schemas + * options in META_IGNORE_OPTIONS are alway set to false + * @param {object} schema schema object + * @param {string} key optional schema key + * @return {Ajv} this for method chaining + */ + addMetaSchema(schema: object, key?: string): Ajv; + /** + * Validate schema + * @param {object|Boolean} schema schema to validate + * @return {Boolean} true if schema is valid + */ + validateSchema(schema: object | boolean): boolean; + /** + * Get compiled schema from the instance by `key` or `ref`. + * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). + * @return {Function} schema validating function (with property `schema`). + */ + getSchema(keyRef: string): ValidateFunction; + /** + * Remove cached schema(s). + * If no parameter is passed all schemas but meta-schemas are removed. + * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining + */ + removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; + /** + * Add custom format + * @param {string} name format name + * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) + * @return {Ajv} this for method chaining + */ + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; + /** + * Define custom keyword + * @this Ajv + * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. + * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; + /** + * Get keyword definition + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. + */ + getKeyword(keyword: string): object | boolean; + /** + * Remove keyword + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining + */ + removeKeyword(keyword: string): Ajv; + /** + * Convert array of error message objects to string + * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {object} options optional options with properties `separator` and `dataVar`. + * @return {string} human readable string with all errors descriptions + */ + errorsText(errors?: Array, options?: ErrorsTextOptions): string; + errors?: Array; + } + + interface Thenable { + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; + } + + interface ValidateFunction { + ( + data: any, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | Thenable; + schema?: object | boolean; + errors?: null | Array; + refs?: object; + refVal?: Array; + root?: ValidateFunction | object; + $async?: true; + source?: object; + } + + interface Options { + $data?: boolean; + allErrors?: boolean; + verbose?: boolean; + jsonPointers?: boolean; + uniqueItems?: boolean; + unicode?: boolean; + format?: string; + formats?: object; + unknownFormats?: true | string[] | 'ignore'; + schemas?: Array | object; + schemaId?: '$id' | 'id'; + missingRefs?: true | 'ignore' | 'fail'; + extendRefs?: true | 'ignore' | 'fail'; + loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => Thenable; + removeAdditional?: boolean | 'all' | 'failing'; + useDefaults?: boolean | 'shared'; + coerceTypes?: boolean | 'array'; + async?: boolean | string; + transpile?: string | ((code: string) => string); + meta?: boolean | object; + validateSchema?: boolean | 'log'; + addUsedSchema?: boolean; + inlineRefs?: boolean | number; + passContext?: boolean; + loopRequired?: number; + ownProperties?: boolean; + multipleOfPrecision?: boolean | number; + errorDataPath?: string, + messages?: boolean; + sourceCode?: boolean; + processCode?: (code: string) => string; + cache?: object; + } + + type FormatValidator = string | RegExp | ((data: string) => boolean | Thenable); + + interface FormatDefinition { + validate: FormatValidator; + compare: (data1: string, data2: string) => number; + async?: boolean; + } + + interface KeywordDefinition { + type?: string | Array; + async?: boolean; + $data?: boolean; + errors?: boolean | string; + metaSchema?: object; + // schema: false makes validate not to expect schema (ValidateFunction) + schema?: boolean; + modifying?: boolean; + valid?: boolean; + // one and only one of the following properties should be present + validate?: SchemaValidateFunction | ValidateFunction; + compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; + macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; + inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; + } + + interface CompilationContext { + level: number; + dataLevel: number; + schema: any; + schemaPath: string; + baseId: string; + async: boolean; + opts: Options; + formats: { + [index: string]: FormatDefinition | undefined; + }; + compositeRule: boolean; + validate: (schema: object) => boolean; + util: { + copy(obj: any, target?: any): any; + toHash(source: string[]): { [index: string]: true | undefined }; + equal(obj: any, target: any): boolean; + getProperty(str: string): string; + schemaHasRules(schema: object, rules: any): string; + escapeQuotes(str: string): string; + toQuotedString(str: string): string; + getData(jsonPointer: string, dataLevel: number, paths: string[]): string; + escapeJsonPointer(str: string): string; + unescapeJsonPointer(str: string): string; + escapeFragment(str: string): string; + unescapeFragment(str: string): string; + }; + self: Ajv; + } + + interface SchemaValidateFunction { + ( + schema: any, + data: any, + parentSchema?: object, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | Thenable; + errors?: Array; + } + + interface ErrorsTextOptions { + separator?: string; + dataVar?: string; + } + + interface ErrorObject { + keyword: string; + dataPath: string; + schemaPath: string; + params: ErrorParameters; + // Added to validation errors of propertyNames keyword schema + propertyName?: string; + // Excluded if messages set to false. + message?: string; + // These are added with the `verbose` option. + schema?: any; + parentSchema?: object; + data?: any; + } + + type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | + DependenciesParams | FormatParams | ComparisonParams | + MultipleOfParams | PatternParams | RequiredParams | + TypeParams | UniqueItemsParams | CustomParams | + PatternGroupsParams | PatternRequiredParams | + PropertyNamesParams | SwitchParams | NoParams | EnumParams; + + interface RefParams { + ref: string; + } + + interface LimitParams { + limit: number; + } + + interface AdditionalPropertiesParams { + additionalProperty: string; + } + + interface DependenciesParams { + property: string; + missingProperty: string; + depsCount: number; + deps: string; + } + + interface FormatParams { + format: string + } + + interface ComparisonParams { + comparison: string; + limit: number | string; + exclusive: boolean; + } + + interface MultipleOfParams { + multipleOf: number; + } + + interface PatternParams { + pattern: string; + } + + interface RequiredParams { + missingProperty: string; + } + + interface TypeParams { + type: string; + } + + interface UniqueItemsParams { + i: number; + j: number; + } + + interface CustomParams { + keyword: string; + } + + interface PatternGroupsParams { + reason: string; + limit: number; + pattern: string; + } + + interface PatternRequiredParams { + missingPattern: string; + } + + interface PropertyNamesParams { + propertyName: string; + } + + interface SwitchParams { + caseIndex: number; + } + + interface NoParams {} + + interface EnumParams { + allowedValues: Array; + } +} + +declare class ValidationError extends Error { + constructor(errors: Array); + + message: string; + errors: Array; + ajv: true; + validation: true; +} + +declare class MissingRefError extends Error { + constructor(baseId: string, ref: string, message?: string); + static message: (baseId: string, ref: string) => string; + + message: string; + missingRef: string; + missingSchema: string; +} + +export = ajv; diff --git a/app/node_modules/ajv/lib/ajv.js b/app/node_modules/ajv/lib/ajv.js new file mode 100644 index 00000000..3148b8e3 --- /dev/null +++ b/app/node_modules/ajv/lib/ajv.js @@ -0,0 +1,502 @@ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./$data') + , patternGroups = require('./patternGroups') + , util = require('./compile/util') + , co = require('co'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); + if (opts.patternGroups) patternGroups(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async === true) + return this._opts.async == '*' ? co(valid) : valid; + this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: hostname, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var month = +matches[1]; + var day = +matches[2]; + return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month]; +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +function hostname(str) { + // https://tools.ietf.org/html/rfc1034#section-3.5 + // https://tools.ietf.org/html/rfc1123#section-2 + return str.length <= 255 && HOSTNAME.test(str); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} diff --git a/app/node_modules/ajv/lib/compile/index.js b/app/node_modules/ajv/lib/compile/index.js new file mode 100644 index 00000000..cf4f5b86 --- /dev/null +++ b/app/node_modules/ajv/lib/compile/index.js @@ -0,0 +1,380 @@ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var co = require('co'); +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(null, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'co', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + co, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; diff --git a/app/node_modules/ajv/lib/compile/util.js b/app/node_modules/ajv/lib/compile/util.js new file mode 100644 index 00000000..263891c3 --- /dev/null +++ b/app/node_modules/ajv/lib/compile/util.js @@ -0,0 +1,267 @@ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i' + , $notOp = $isMax ? '>' : '<' + , $errorKeyword = undefined; +}} + +{{? $isDataExcl }} + {{ + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) + , $exclusive = 'exclusive' + $lvl + , $exclType = 'exclType' + $lvl + , $exclIsNumber = 'exclIsNumber' + $lvl + , $opExpr = 'op' + $lvl + , $opStr = '\' + ' + $opExpr + ' + \''; + }} + var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; + {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} + + var {{=$exclusive}}; + var {{=$exclType}} = typeof {{=$schemaValueExcl}}; + if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { + {{ var $errorKeyword = $exclusiveKeyword; }} + {{# def.error:'_exclusiveLimit' }} + } else if ({{# def.$dataNotType:'number' }} + {{=$exclType}} == 'number' + ? ( + ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) + ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + : ( + ({{=$exclusive}} = {{=$schemaValueExcl}} === true) + ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + || {{=$data}} !== {{=$data}}) { + var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; +{{??}} + {{ + var $exclIsNumber = typeof $schemaExcl == 'number' + , $opStr = $op; /*used in error*/ + }} + + {{? $exclIsNumber && $isData }} + {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} + if ({{# def.$dataNotType:'number' }} + ( {{=$schemaValue}} === undefined + || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} + ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) + || {{=$data}} !== {{=$data}}) { + {{??}} + {{ + if ($exclIsNumber && $schema === undefined) { + {{# def.setExclusiveLimit }} + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) + $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + {{# def.setExclusiveLimit }} + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + + var $opExpr = '\'' + $opStr + '\''; /*used in error*/ + }} + + if ({{# def.$dataNotType:'number' }} + {{=$data}} {{=$notOp}} {{=$schemaValue}} + || {{=$data}} !== {{=$data}}) { + {{?}} +{{?}} + {{ $errorKeyword = $errorKeyword || $keyword; }} + {{# def.error:'_limit' }} + } {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/_limitItems.jst b/app/node_modules/ajv/lib/dot/_limitItems.jst new file mode 100644 index 00000000..a3e078e5 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/_limitItems.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitItems' }} +} {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/_limitLength.jst b/app/node_modules/ajv/lib/dot/_limitLength.jst new file mode 100644 index 00000000..cfc8dbb0 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/_limitLength.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitLength' }} +} {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/_limitProperties.jst b/app/node_modules/ajv/lib/dot/_limitProperties.jst new file mode 100644 index 00000000..da7ea776 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/_limitProperties.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitProperties' }} +} {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/allOf.jst b/app/node_modules/ajv/lib/dot/allOf.jst new file mode 100644 index 00000000..4c283631 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/allOf.jst @@ -0,0 +1,34 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $allSchemasEmpty = true; +}} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{# def.ifResultValid }} + {{?}} +{{~}} + +{{? $breakOnError }} + {{? $allSchemasEmpty }} + if (true) { + {{??}} + {{= $closingBraces.slice(0,-1) }} + {{?}} +{{?}} + +{{# def.cleanUp }} diff --git a/app/node_modules/ajv/lib/dot/anyOf.jst b/app/node_modules/ajv/lib/dot/anyOf.jst new file mode 100644 index 00000000..086cf2b3 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/anyOf.jst @@ -0,0 +1,48 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $noEmptySchema = $schema.every(function($sch) { + return {{# def.nonEmptySchema:$sch }}; + }); +}} +{{? $noEmptySchema }} + {{ var $currentBaseId = $it.baseId; }} + var {{=$errs}} = errors; + var {{=$valid}} = false; + + {{# def.setCompositeRule }} + + {{~ $schema:$sch:$i }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{=$valid}} = {{=$valid}} || {{=$nextValid}}; + + if (!{{=$valid}}) { + {{ $closingBraces += '}'; }} + {{~}} + + {{# def.resetCompositeRule }} + + {{= $closingBraces }} + + if (!{{=$valid}}) { + {{# def.extraError:'anyOf' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} + + {{# def.cleanUp }} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} diff --git a/app/node_modules/ajv/lib/dot/coerce.def b/app/node_modules/ajv/lib/dot/coerce.def new file mode 100644 index 00000000..86e0e18a --- /dev/null +++ b/app/node_modules/ajv/lib/dot/coerce.def @@ -0,0 +1,61 @@ +{{## def.coerceType: + {{ + var $dataType = 'dataType' + $lvl + , $coerced = 'coerced' + $lvl; + }} + var {{=$dataType}} = typeof {{=$data}}; + {{? it.opts.coerceTypes == 'array'}} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array'; + {{?}} + + var {{=$coerced}} = undefined; + + {{ var $bracesCoercion = ''; }} + {{~ $coerceToTypes:$type:$i }} + {{? $i }} + if ({{=$coerced}} === undefined) { + {{ $bracesCoercion += '}'; }} + {{?}} + + {{? it.opts.coerceTypes == 'array' && $type != 'array' }} + if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) { + {{=$coerced}} = {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/ + } + {{?}} + + {{? $type == 'string' }} + if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + {{=$coerced}} = '' + {{=$data}}; + else if ({{=$data}} === null) {{=$coerced}} = ''; + {{?? $type == 'number' || $type == 'integer' }} + if ({{=$dataType}} == 'boolean' || {{=$data}} === null + || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} + {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) + {{=$coerced}} = +{{=$data}}; + {{?? $type == 'boolean' }} + if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + {{=$coerced}} = false; + else if ({{=$data}} === 'true' || {{=$data}} === 1) + {{=$coerced}} = true; + {{?? $type == 'null' }} + if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + {{=$coerced}} = null; + {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} + if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + {{=$coerced}} = [{{=$data}}]; + {{?}} + {{~}} + + {{= $bracesCoercion }} + + if ({{=$coerced}} === undefined) { + {{# def.error:'type' }} + } else { + {{# def.setParentData }} + {{=$data}} = {{=$coerced}}; + {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} + {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; + } +#}} diff --git a/app/node_modules/ajv/lib/dot/const.jst b/app/node_modules/ajv/lib/dot/const.jst new file mode 100644 index 00000000..2aa22980 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/const.jst @@ -0,0 +1,11 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{? !$isData }} + var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); +{{# def.checkError:'const' }} +{{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/contains.jst b/app/node_modules/ajv/lib/dot/contains.jst new file mode 100644 index 00000000..925d2c84 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/contains.jst @@ -0,0 +1,57 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId + , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? $nonEmptySchema }} + {{# def.setCompositeRule }} + + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$nextValid}} = false; + + for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + if ({{=$nextValid}}) break; + } + + {{# def.resetCompositeRule }} + {{= $closingBraces }} + + if (!{{=$nextValid}}) { +{{??}} + if ({{=$data}}.length == 0) { +{{?}} + + {{# def.error:'contains' }} + } else { + {{? $nonEmptySchema }} + {{# def.resetErrors }} + {{?}} + {{? it.opts.allErrors }} } {{?}} + +{{# def.cleanUp }} diff --git a/app/node_modules/ajv/lib/dot/custom.jst b/app/node_modules/ajv/lib/dot/custom.jst new file mode 100644 index 00000000..402028e6 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/custom.jst @@ -0,0 +1,191 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $rule = this + , $definition = 'definition' + $lvl + , $rDef = $rule.definition + , $closingBraces = ''; + var $validate = $rDef.validate; + var $compile, $inline, $macro, $ruleValidate, $validateCode; +}} + +{{? $isData && $rDef.$data }} + {{ + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + }} + var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; + var {{=$validateCode}} = {{=$definition}}.validate; +{{??}} + {{ + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + }} +{{?}} + +{{ + var $ruleErrs = $validateCode + '.errors' + , $i = 'i' + $lvl + , $ruleErr = 'ruleErr' + $lvl + , $asyncKeyword = $rDef.async; + + if ($asyncKeyword && !it.async) + throw new Error('async keyword in sync schema'); +}} + + +{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} +var {{=$errs}} = errors; +var {{=$valid}}; + +{{## def.callRuleValidate: + {{=$validateCode}}.call( + {{? it.opts.passContext }}this{{??}}self{{?}} + {{? $compile || $rDef.schema === false }} + , {{=$data}} + {{??}} + , {{=$schemaValue}} + , {{=$data}} + , validate.schema{{=it.schemaPath}} + {{?}} + , {{# def.dataPath }} + {{# def.passParentData }} + , rootData + ) +#}} + +{{## def.extendErrors:_inline: + for (var {{=$i}}={{=$errs}}; {{=$i}}= 0 }} + {{# def.skipFormat }} + {{??}} + {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} + {{?}} + {{?}} + {{ + var $isObject = typeof $format == 'object' + && !($format instanceof RegExp) + && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + }} + {{? $formatType != $ruleType }} + {{# def.skipFormat }} + {{?}} + {{? $async }} + {{ + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + }} + if (!({{=it.yieldAwait}} {{=$formatRef}}({{=$data}}))) { + {{??}} + if (!{{# def.checkFormat }}) { + {{?}} +{{?}} + {{# def.error:'format' }} + } {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/items.jst b/app/node_modules/ajv/lib/dot/items.jst new file mode 100644 index 00000000..8c0f5acb --- /dev/null +++ b/app/node_modules/ajv/lib/dot/items.jst @@ -0,0 +1,100 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateItems:startFrom: + for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} + if (!{{=$nextValid}}) break; + {{?}} + } +#}} + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? Array.isArray($schema) }} + {{ /* 'items' is an array of schemas */}} + {{ var $additionalItems = it.schema.additionalItems; }} + {{? $additionalItems === false }} + {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{# def.checkError:'additionalItems' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{# def.elseIfValid}} + {{?}} + + {{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{=$i}}) { + {{ + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + } + + {{# def.ifResultValid }} + {{?}} + {{~}} + + {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} + {{ + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{= $schema.length }}) { + {{# def.validateItems: $schema.length }} + } + + {{# def.ifResultValid }} + {{?}} + +{{?? {{# def.nonEmptySchema:$schema }} }} + {{ /* 'items' is a single schema */}} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + {{# def.validateItems: 0 }} +{{?}} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/app/node_modules/ajv/lib/dot/missing.def b/app/node_modules/ajv/lib/dot/missing.def new file mode 100644 index 00000000..a73b9f96 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/missing.def @@ -0,0 +1,39 @@ +{{## def.checkMissingProperty:_properties: + {{~ _properties:$propertyKey:$i }} + {{?$i}} || {{?}} + {{ + var $prop = it.util.getProperty($propertyKey) + , $useData = $data + $prop; + }} + ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) + {{~}} +#}} + + +{{## def.errorMissingProperty:_error: + {{ + var $propertyPath = 'missing' + $lvl + , $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers + ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) + : $currentErrorPath + ' + ' + $propertyPath; + } + }} + {{# def.error:_error }} +#}} + + +{{## def.allErrorsMissingProperty:_error: + {{ + var $prop = it.util.getProperty($propertyKey) + , $missingProperty = it.util.escapeQuotes($propertyKey) + , $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + }} + if ({{# def.noPropertyInData }}) { + {{# def.addError:_error }} + } +#}} diff --git a/app/node_modules/ajv/lib/dot/multipleOf.jst b/app/node_modules/ajv/lib/dot/multipleOf.jst new file mode 100644 index 00000000..5f8dd33b --- /dev/null +++ b/app/node_modules/ajv/lib/dot/multipleOf.jst @@ -0,0 +1,20 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +var division{{=$lvl}}; +if ({{?$isData}} + {{=$schemaValue}} !== undefined && ( + typeof {{=$schemaValue}} != 'number' || + {{?}} + (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, + {{? it.opts.multipleOfPrecision }} + Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} + {{??}} + division{{=$lvl}} !== parseInt(division{{=$lvl}}) + {{?}} + ) + {{?$isData}} ) {{?}} ) { + {{# def.error:'multipleOf' }} +} {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/not.jst b/app/node_modules/ajv/lib/dot/not.jst new file mode 100644 index 00000000..e03185ae --- /dev/null +++ b/app/node_modules/ajv/lib/dot/not.jst @@ -0,0 +1,43 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$errs}} = errors; + + {{# def.setCompositeRule }} + + {{ + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + }} + {{= it.validate($it) }} + {{ + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + }} + + {{# def.resetCompositeRule }} + + if ({{=$nextValid}}) { + {{# def.error:'not' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{# def.addError:'not' }} + {{? $breakOnError}} + if (false) { + {{?}} +{{?}} diff --git a/app/node_modules/ajv/lib/dot/oneOf.jst b/app/node_modules/ajv/lib/dot/oneOf.jst new file mode 100644 index 00000000..59a43554 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/oneOf.jst @@ -0,0 +1,44 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +var {{=$errs}} = errors; +var prevValid{{=$lvl}} = false; +var {{=$valid}} = false; + +{{ var $currentBaseId = $it.baseId; }} +{{# def.setCompositeRule }} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + {{??}} + var {{=$nextValid}} = true; + {{?}} + + {{? $i }} + if ({{=$nextValid}} && prevValid{{=$lvl}}) + {{=$valid}} = false; + else { + {{ $closingBraces += '}'; }} + {{?}} + + if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true; +{{~}} + +{{# def.resetCompositeRule }} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{# def.extraError:'oneOf' }} +} else { + {{# def.resetErrors }} +{{? it.opts.allErrors }} } {{?}} diff --git a/app/node_modules/ajv/lib/dot/pattern.jst b/app/node_modules/ajv/lib/dot/pattern.jst new file mode 100644 index 00000000..3a37ef6c --- /dev/null +++ b/app/node_modules/ajv/lib/dot/pattern.jst @@ -0,0 +1,14 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $regexp = $isData + ? '(new RegExp(' + $schemaValue + '))' + : it.usePattern($schema); +}} + +if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { + {{# def.error:'pattern' }} +} {{? $breakOnError }} else { {{?}} diff --git a/app/node_modules/ajv/lib/dot/properties.jst b/app/node_modules/ajv/lib/dot/properties.jst new file mode 100644 index 00000000..8d56324b --- /dev/null +++ b/app/node_modules/ajv/lib/dot/properties.jst @@ -0,0 +1,327 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateAdditional: + {{ /* additionalProperties is schema */ + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty + ? it.errorPath + : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} +#}} + + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl; + + var $schemaKeys = Object.keys($schema || {}) + , $pProperties = it.schema.patternProperties || {} + , $pPropertyKeys = Object.keys($pProperties) + , $aProperties = it.schema.additionalProperties + , $someProperties = $schemaKeys.length || $pPropertyKeys.length + , $noAdditional = $aProperties === false + , $additionalIsSchema = typeof $aProperties == 'object' + && Object.keys($aProperties).length + , $removeAdditional = it.opts.removeAdditional + , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) + var $requiredHash = it.util.toHash($required); + + if (it.opts.patternGroups) { + var $pgProperties = it.schema.patternGroups || {} + , $pgPropertyKeys = Object.keys($pgProperties); + } +}} + + +var {{=$errs}} = errors; +var {{=$nextValid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{? $checkAdditional }} + {{# def.iterateProperties }} + {{? $someProperties }} + var isAdditional{{=$lvl}} = !(false + {{? $schemaKeys.length }} + {{? $schemaKeys.length > 5 }} + || validate.schema{{=$schemaPath}}[{{=$key}}] + {{??}} + {{~ $schemaKeys:$propertyKey }} + || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} + {{~}} + {{?}} + {{?}} + {{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty:$i }} + || {{= it.usePattern($pProperty) }}.test({{=$key}}) + {{~}} + {{?}} + {{? it.opts.patternGroups && $pgPropertyKeys.length }} + {{~ $pgPropertyKeys:$pgProperty:$i }} + || {{= it.usePattern($pgProperty) }}.test({{=$key}}) + {{~}} + {{?}} + ); + + if (isAdditional{{=$lvl}}) { + {{?}} + {{? $removeAdditional == 'all' }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{ + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + }} + {{? $noAdditional }} + {{? $removeAdditional }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{=$nextValid}} = false; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + }} + {{# def.error:'additionalProperties' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{? $breakOnError }} break; {{?}} + {{?}} + {{?? $additionalIsSchema }} + {{? $removeAdditional == 'failing' }} + var {{=$errs}} = errors; + {{# def.setCompositeRule }} + + {{# def.validateAdditional }} + + if (!{{=$nextValid}}) { + errors = {{=$errs}}; + if (validate.errors !== null) { + if (errors) validate.errors.length = errors; + else validate.errors = null; + } + delete {{=$data}}[{{=$key}}]; + } + + {{# def.resetCompositeRule }} + {{??}} + {{# def.validateAdditional }} + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + {{?}} + {{?}} + {{ it.errorPath = $currentErrorPath; }} + {{?}} + {{? $someProperties }} + } + {{?}} + } + + {{# def.ifResultValid }} +{{?}} + +{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} + +{{? $schemaKeys.length }} + {{~ $schemaKeys:$propertyKey }} + {{ var $sch = $schema[$propertyKey]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + var $prop = it.util.getProperty($propertyKey) + , $passData = $data + $prop + , $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + }} + + {{# def.generateSubschemaCode }} + + {{? {{# def.willOptimize }} }} + {{ + $code = {{# def._optimizeValidate }}; + var $useData = $passData; + }} + {{??}} + {{ var $useData = $nextData; }} + var {{=$nextData}} = {{=$passData}}; + {{?}} + + {{? $hasDefault }} + {{= $code }} + {{??}} + {{? $requiredHash && $requiredHash[$propertyKey] }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = false; + {{ + var $currentErrorPath = it.errorPath + , $currErrSchemaPath = $errSchemaPath + , $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + }} + {{# def.error:'required' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{ it.errorPath = $currentErrorPath; }} + } else { + {{??}} + {{? $breakOnError }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = true; + } else { + {{??}} + if ({{=$useData}} !== undefined + {{? $ownProperties }} + && {{# def.isOwnProperty }} + {{?}} + ) { + {{?}} + {{?}} + + {{= $code }} + } + {{?}} {{ /* $hasDefault */ }} + {{?}} {{ /* def.nonEmptySchema */ }} + + {{# def.ifResultValid }} + {{~}} +{{?}} + +{{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty }} + {{ var $sch = $pProperties[$pProperty]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + + it.util.escapeFragment($pProperty); + }} + + {{# def.iterateProperties }} + if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? it.opts.patternGroups && $pgPropertyKeys.length }} + {{~ $pgPropertyKeys:$pgProperty }} + {{ + var $pgSchema = $pgProperties[$pgProperty] + , $sch = $pgSchema.schema; + }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; + $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + + it.util.escapeFragment($pgProperty) + + '/schema'; + }} + + var pgPropCount{{=$lvl}} = 0; + + {{# def.iterateProperties }} + if ({{= it.usePattern($pgProperty) }}.test({{=$key}})) { + pgPropCount{{=$lvl}}++; + + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + + {{ + var $pgMin = $pgSchema.minimum + , $pgMax = $pgSchema.maximum; + }} + {{? $pgMin !== undefined || $pgMax !== undefined }} + var {{=$valid}} = true; + + {{ var $currErrSchemaPath = $errSchemaPath; }} + + {{? $pgMin !== undefined }} + {{ var $limit = $pgMin, $reason = 'minimum', $moreOrLess = 'less'; }} + {{=$valid}} = pgPropCount{{=$lvl}} >= {{=$pgMin}}; + {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; }} + {{# def.checkError:'patternGroups' }} + {{? $pgMax !== undefined }} + else + {{?}} + {{?}} + + {{? $pgMax !== undefined }} + {{ var $limit = $pgMax, $reason = 'maximum', $moreOrLess = 'more'; }} + {{=$valid}} = pgPropCount{{=$lvl}} <= {{=$pgMax}}; + {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; }} + {{# def.checkError:'patternGroups' }} + {{?}} + + {{ $errSchemaPath = $currErrSchemaPath; }} + + {{# def.ifValid }} + {{?}} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/app/node_modules/ajv/lib/dot/propertyNames.jst b/app/node_modules/ajv/lib/dot/propertyNames.jst new file mode 100644 index 00000000..51caffc2 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/propertyNames.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + {{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $i = 'i' + $lvl + , $invalidName = '\' + ' + $key + ' + \'' + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + }} + + var {{=$errs}} = errors; + + {{? $ownProperties }} + var {{=$dataProperties}} = undefined; + {{?}} + {{# def.iterateProperties }} + var startErrs{{=$lvl}} = errors; + + {{ var $passData = $key; }} + {{# def.setCompositeRule }} + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + {{# def.resetCompositeRule }} + + if (!{{=$nextValid}}) { + for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired + , $ownProperties = it.opts.ownProperties; + }} + + {{? $breakOnError }} + var missing{{=$lvl}}; + {{? $loopRequired }} + {{# def.setupLoop }} + var {{=$valid}} = true; + + {{?$isData}}{{# def.check$dataIsArray }}{{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined + {{? $ownProperties }} + && {{# def.isRequiredOwnProperty }} + {{?}}; + if (!{{=$valid}}) break; + } + + {{? $isData }} } {{?}} + + {{# def.checkError:'required' }} + else { + {{??}} + if ({{# def.checkMissingProperty:$required }}) { + {{# def.errorMissingProperty:'required' }} + } else { + {{?}} + {{??}} + {{? $loopRequired }} + {{# def.setupLoop }} + {{? $isData }} + if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { + {{# def.addError:'required' }} + } else if ({{=$vSchema}} !== undefined) { + {{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined + {{? $ownProperties }} + || !{{# def.isRequiredOwnProperty }} + {{?}}) { + {{# def.addError:'required' }} + } + } + + {{? $isData }} } {{?}} + {{??}} + {{~ $required:$propertyKey }} + {{# def.allErrorsMissingProperty:'required' }} + {{~}} + {{?}} + {{?}} + + {{ it.errorPath = $currentErrorPath; }} + +{{?? $breakOnError }} + if (true) { +{{?}} diff --git a/app/node_modules/ajv/lib/dot/uniqueItems.jst b/app/node_modules/ajv/lib/dot/uniqueItems.jst new file mode 100644 index 00000000..dfc42b03 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/uniqueItems.jst @@ -0,0 +1,38 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + + +{{? ($schema || $isData) && it.opts.uniqueItems !== false }} + {{? $isData }} + var {{=$valid}}; + if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) + {{=$valid}} = true; + else if (typeof {{=$schemaValue}} != 'boolean') + {{=$valid}} = false; + else { + {{?}} + + var {{=$valid}} = true; + if ({{=$data}}.length > 1) { + var i = {{=$data}}.length, j; + outer: + for (;i--;) { + for (j = i; j--;) { + if (equal({{=$data}}[i], {{=$data}}[j])) { + {{=$valid}} = false; + break outer; + } + } + } + } + + {{? $isData }} } {{?}} + + if (!{{=$valid}}) { + {{# def.error:'uniqueItems' }} + } {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} if (true) { {{?}} +{{?}} diff --git a/app/node_modules/ajv/lib/dot/validate.jst b/app/node_modules/ajv/lib/dot/validate.jst new file mode 100644 index 00000000..273e4c37 --- /dev/null +++ b/app/node_modules/ajv/lib/dot/validate.jst @@ -0,0 +1,272 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.defaults }} +{{# def.coerce }} + +{{ /** + * schema compilation (render) time: + * it = { schema, RULES, _validate, opts } + * it.validate - this template function, + * it is used recursively to generate code for subschemas + * + * runtime: + * "validate" is a variable name to which this function will be assigned + * validateRef etc. are defined in the parent scope in index.js + */ }} + +{{ + var $async = it.schema.$async === true + , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') + , $id = it.self._getId(it.schema); +}} + +{{? it.isTop }} + {{? $async }} + {{ + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + }} + {{?}} + + var validate = + {{? $async }} + {{? $es7 }} + (async function + {{??}} + {{? it.opts.async != '*'}}co.wrap{{?}}(function* + {{?}} + {{??}} + (function + {{?}} + (data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + {{? $id && (it.opts.sourceCode || it.opts.processCode) }} + {{= '/\*# sourceURL=' + $id + ' */' }} + {{?}} +{{?}} + +{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} + {{ var $keyword = 'false schema'; }} + {{# def.setupKeyword }} + {{? it.schema === false}} + {{? it.isTop}} + {{ $breakOnError = true; }} + {{??}} + var {{=$valid}} = false; + {{?}} + {{# def.error:'false schema' }} + {{??}} + {{? it.isTop}} + {{? $async }} + return data; + {{??}} + validate.errors = null; + return true; + {{?}} + {{??}} + var {{=$valid}} = true; + {{?}} + {{?}} + + {{? it.isTop}} + }); + return validate; + {{?}} + + {{ return out; }} +{{?}} + + +{{? it.isTop }} + {{ + var $top = it.isTop + , $lvl = it.level = 0 + , $dataLvl = it.dataLevel = 0 + , $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + + it.dataPathArr = [undefined]; + }} + + var vErrors = null; {{ /* don't edit, used in replace */ }} + var errors = 0; {{ /* don't edit, used in replace */ }} + if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} +{{??}} + {{ + var $lvl = it.level + , $dataLvl = it.dataLevel + , $data = 'data' + ($dataLvl || ''); + + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + + if ($async && !it.async) throw new Error('async schema in sync schema'); + }} + + var errs_{{=$lvl}} = errors; +{{?}} + +{{ + var $valid = 'valid' + $lvl + , $breakOnError = !it.opts.allErrors + , $closingBraces1 = '' + , $closingBraces2 = ''; + + var $errorKeyword; + var $typeSchema = it.schema.type + , $typeIsArray = Array.isArray($typeSchema); + + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } +}} + +{{## def.checkType: + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type' + , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + }} + + if ({{= it.util[$method]($typeSchema, $data, true) }}) { +#}} + +{{? it.schema.$ref && $refKeywords }} + {{? it.opts.extendRefs == 'fail' }} + {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} + {{?? it.opts.extendRefs !== true }} + {{ + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + }} + {{?}} +{{?}} + +{{? $typeSchema }} + {{? it.opts.coerceTypes }} + {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} + {{?}} + + {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} + {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || + ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.checkType }} + {{? $coerceToTypes }} + {{# def.coerceType }} + {{??}} + {{# def.error:'type' }} + {{?}} + } + {{?}} +{{?}} + + +{{? it.schema.$ref && !$refKeywords }} + {{= it.RULES.all.$ref.code(it, '$ref') }} + {{? $breakOnError }} + } + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} +{{??}} + {{? it.opts.v5 && it.schema.patternGroups }} + {{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }} + {{?}} + {{~ it.RULES:$rulesGroup }} + {{? $shouldUseGroup($rulesGroup) }} + {{? $rulesGroup.type }} + if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) { + {{?}} + {{? it.opts.useDefaults && !it.compositeRule }} + {{? $rulesGroup.type == 'object' && it.schema.properties }} + {{# def.defaultProperties }} + {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} + {{# def.defaultItems }} + {{?}} + {{?}} + {{~ $rulesGroup.rules:$rule }} + {{? $shouldUseRule($rule) }} + {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} + {{? $code }} + {{= $code }} + {{? $breakOnError }} + {{ $closingBraces1 += '}'; }} + {{?}} + {{?}} + {{?}} + {{~}} + {{? $breakOnError }} + {{= $closingBraces1 }} + {{ $closingBraces1 = ''; }} + {{?}} + {{? $rulesGroup.type }} + } + {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} + else { + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.error:'type' }} + } + {{?}} + {{?}} + + {{? $breakOnError }} + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} + {{?}} + {{~}} +{{?}} + +{{? $breakOnError }} {{= $closingBraces2 }} {{?}} + +{{? $top }} + {{? $async }} + if (errors === 0) return data; {{ /* don't edit, used in replace */ }} + else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} + {{??}} + validate.errors = vErrors; {{ /* don't edit, used in replace */ }} + return errors === 0; {{ /* don't edit, used in replace */ }} + {{?}} + }); + + return validate; +{{??}} + var {{=$valid}} = errors === errs_{{=$lvl}}; +{{?}} + +{{# def.cleanUp }} + +{{? $top }} + {{# def.finalCleanUp }} +{{?}} + +{{ + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i=0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) + return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || + ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i=0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) + return true; + } +}} diff --git a/app/node_modules/ajv/lib/dotjs/README.md b/app/node_modules/ajv/lib/dotjs/README.md new file mode 100644 index 00000000..4d994846 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/app/node_modules/ajv/lib/dotjs/_limit.js b/app/node_modules/ajv/lib/dotjs/_limit.js new file mode 100644 index 00000000..10a187fb --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/_limit.js @@ -0,0 +1,149 @@ +'use strict'; +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/_limitItems.js b/app/node_modules/ajv/lib/dotjs/_limitItems.js new file mode 100644 index 00000000..16e37f21 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/_limitItems.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/_limitLength.js b/app/node_modules/ajv/lib/dotjs/_limitLength.js new file mode 100644 index 00000000..e6927f39 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/_limitLength.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/_limitProperties.js b/app/node_modules/ajv/lib/dotjs/_limitProperties.js new file mode 100644 index 00000000..a48308f8 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/_limitProperties.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/allOf.js b/app/node_modules/ajv/lib/dotjs/allOf.js new file mode 100644 index 00000000..5107b18c --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/allOf.js @@ -0,0 +1,43 @@ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/anyOf.js b/app/node_modules/ajv/lib/dotjs/anyOf.js new file mode 100644 index 00000000..994b0912 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/anyOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/const.js b/app/node_modules/ajv/lib/dotjs/const.js new file mode 100644 index 00000000..d19756e1 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/const.js @@ -0,0 +1,55 @@ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/contains.js b/app/node_modules/ajv/lib/dotjs/contains.js new file mode 100644 index 00000000..04c6e936 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/contains.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/custom.js b/app/node_modules/ajv/lib/dotjs/custom.js new file mode 100644 index 00000000..bff06d11 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/custom.js @@ -0,0 +1,226 @@ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += '' + (it.yieldAwait); + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/items.js b/app/node_modules/ajv/lib/dotjs/items.js new file mode 100644 index 00000000..77be5e21 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/items.js @@ -0,0 +1,140 @@ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/multipleOf.js b/app/node_modules/ajv/lib/dotjs/multipleOf.js new file mode 100644 index 00000000..df5a3154 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/multipleOf.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/not.js b/app/node_modules/ajv/lib/dotjs/not.js new file mode 100644 index 00000000..67add9f6 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/not.js @@ -0,0 +1,83 @@ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/oneOf.js b/app/node_modules/ajv/lib/dotjs/oneOf.js new file mode 100644 index 00000000..b4cd4606 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/oneOf.js @@ -0,0 +1,70 @@ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;'; + var $currentBaseId = $it.baseId; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/pattern.js b/app/node_modules/ajv/lib/dotjs/pattern.js new file mode 100644 index 00000000..76b7794e --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/pattern.js @@ -0,0 +1,74 @@ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/properties.js b/app/node_modules/ajv/lib/dotjs/properties.js new file mode 100644 index 00000000..3c6cecf6 --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/properties.js @@ -0,0 +1,468 @@ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if (it.opts.patternGroups) { + var $pgProperties = it.schema.patternGroups || {}, + $pgPropertyKeys = Object.keys($pgProperties); + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr3 = $pgPropertyKeys; + if (arr3) { + var $pgProperty, $i = -1, + l3 = arr3.length - 1; + while ($i < l3) { + $pgProperty = arr3[$i += 1]; + out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have additional properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr4 = $schemaKeys; + if (arr4) { + var $propertyKey, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $propertyKey = arr4[i4 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr6 = $pgPropertyKeys; + if (arr6) { + var $pgProperty, i6 = -1, + l6 = arr6.length - 1; + while (i6 < l6) { + $pgProperty = arr6[i6 += 1]; + var $pgSchema = $pgProperties[$pgProperty], + $sch = $pgSchema.schema; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; + $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + var $pgMin = $pgSchema.minimum, + $pgMax = $pgSchema.maximum; + if ($pgMin !== undefined || $pgMax !== undefined) { + out += ' var ' + ($valid) + ' = true; '; + var $currErrSchemaPath = $errSchemaPath; + if ($pgMin !== undefined) { + var $limit = $pgMin, + $reason = 'minimum', + $moreOrLess = 'less'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($pgMax !== undefined) { + out += ' else '; + } + } + if ($pgMax !== undefined) { + var $limit = $pgMax, + $reason = 'maximum', + $moreOrLess = 'more'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/propertyNames.js b/app/node_modules/ajv/lib/dotjs/propertyNames.js new file mode 100644 index 00000000..0cedcdac --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/propertyNames.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/uniqueItems.js b/app/node_modules/ajv/lib/dotjs/uniqueItems.js new file mode 100644 index 00000000..d9b3185f --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/uniqueItems.js @@ -0,0 +1,71 @@ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/app/node_modules/ajv/lib/dotjs/validate.js b/app/node_modules/ajv/lib/dotjs/validate.js new file mode 100644 index 00000000..5ff9beee --- /dev/null +++ b/app/node_modules/ajv/lib/dotjs/validate.js @@ -0,0 +1,458 @@ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + if ($async) { + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + } + out += ' var validate = '; + if ($async) { + if ($es7) { + out += ' (async function '; + } else { + if (it.opts.async != '*') { + out += 'co.wrap'; + } + out += '(function* '; + } + } else { + out += ' (function '; + } + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }); return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} diff --git a/app/node_modules/ajv/lib/keyword.js b/app/node_modules/ajv/lib/keyword.js new file mode 100644 index 00000000..5fcfb75f --- /dev/null +++ b/app/node_modules/ajv/lib/keyword.js @@ -0,0 +1,135 @@ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i=4\" eslint lib/*.js lib/compile/*.js spec/*.js scripts", + "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*", + "prepublish": "npm run build && npm run bundle-all", + "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser", + "test-browser": "del-cli .browser && npm run bundle-all && scripts/prepare-tests && npm run test-karma", + "test-cov": "nyc npm run test-spec", + "test-debug": "mocha spec/*.spec.js --debug-brk -R spec", + "test-fast": "AJV_FAST_TEST=true npm run test-spec", + "test-karma": "karma start --single-run --browsers PhantomJS", + "test-spec": "mocha spec/*.spec.js -R spec $(if-node-version 7 echo --harmony-async-await)", + "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts", + "watch": "watch 'npm run build' ./lib/dot" + }, + "tonicExampleFilename": ".tonic_example.js", + "typings": "lib/ajv.d.ts", + "version": "5.5.2" +} diff --git a/app/node_modules/ajv/scripts/.eslintrc.yml b/app/node_modules/ajv/scripts/.eslintrc.yml new file mode 100644 index 00000000..493d7d31 --- /dev/null +++ b/app/node_modules/ajv/scripts/.eslintrc.yml @@ -0,0 +1,3 @@ +rules: + no-console: 0 + no-empty: [2, allowEmptyCatch: true] diff --git a/app/node_modules/ajv/scripts/bundle.js b/app/node_modules/ajv/scripts/bundle.js new file mode 100644 index 00000000..e381a762 --- /dev/null +++ b/app/node_modules/ajv/scripts/bundle.js @@ -0,0 +1,61 @@ +'use strict'; + +var fs = require('fs') + , path = require('path') + , browserify = require('browserify') + , uglify = require('uglify-js'); + +var pkg = process.argv[2] + , standalone = process.argv[3] + , compress = process.argv[4]; + +var packageDir = path.join(__dirname, '..'); +if (pkg != '.') packageDir = path.join(packageDir, 'node_modules', pkg); + +var json = require(path.join(packageDir, 'package.json')); + +var distDir = path.join(__dirname, '..', 'dist'); +if (!fs.existsSync(distDir)) fs.mkdirSync(distDir); + +var bOpts = {}; +if (standalone) bOpts.standalone = standalone; + +browserify(bOpts) +.require(path.join(packageDir, json.main), {expose: json.name}) +.bundle(function (err, buf) { + if (err) { + console.error('browserify error:', err); + process.exit(1); + } + + var outputFile = path.join(distDir, json.name); + var uglifyOpts = { + warnings: true, + compress: {}, + output: { + preamble: '/* ' + json.name + ' ' + json.version + ': ' + json.description + ' */' + } + }; + if (compress) { + var compressOpts = compress.split(','); + for (var i=0, il = compressOpts.length; i]+ajv_logo[^>]+>//" index.md + git config user.email "$GIT_USER_EMAIL" + git config user.name "$GIT_USER_NAME" + git add . + git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin gh-pages > /dev/null 2>&1 + } +fi diff --git a/app/node_modules/ansi-regex/index.js b/app/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..b9574ed7 --- /dev/null +++ b/app/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/app/node_modules/ansi-regex/license b/app/node_modules/ansi-regex/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/app/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/app/node_modules/ansi-regex/package.json b/app/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..18696b10 --- /dev/null +++ b/app/node_modules/ansi-regex/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + "ansi-regex@2.1.1", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "ansi-regex@2.1.1", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-regex@2.1.1", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/s2/Documents/Code/gitlit/app", + "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": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "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", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/app/node_modules/ansi-regex/readme.md b/app/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..6a928edf --- /dev/null +++ b/app/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# 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](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save 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. If I recall correctly, 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. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/app/node_modules/array-find-index/index.js b/app/node_modules/array-find-index/index.js new file mode 100644 index 00000000..e2dcd9a0 --- /dev/null +++ b/app/node_modules/array-find-index/index.js @@ -0,0 +1,25 @@ +'use strict'; +module.exports = function (arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === 'function') { + return arr.findIndex(predicate, ctx); + } + + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + var list = Object(arr); + var len = list.length; + + if (len === 0) { + return -1; + } + + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + + return -1; +}; diff --git a/app/node_modules/array-find-index/license b/app/node_modules/array-find-index/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/app/node_modules/array-find-index/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/app/node_modules/array-find-index/package.json b/app/node_modules/array-find-index/package.json new file mode 100644 index 00000000..3c7d4f45 --- /dev/null +++ b/app/node_modules/array-find-index/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "array-find-index@1.0.2", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "array-find-index@1.0.2", + "_id": "array-find-index@1.0.2", + "_inBundle": false, + "_integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "_location": "/array-find-index", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-find-index@1.0.2", + "name": "array-find-index", + "escapedName": "array-find-index", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/currently-unhandled" + ], + "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-find-index/issues" + }, + "description": "ES2015 `Array#findIndex()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/array-find-index#readme", + "keywords": [ + "es2015", + "ponyfill", + "polyfill", + "shim", + "find", + "index", + "findindex", + "array" + ], + "license": "MIT", + "name": "array-find-index", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-find-index.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/app/node_modules/array-find-index/readme.md b/app/node_modules/array-find-index/readme.md new file mode 100644 index 00000000..31663411 --- /dev/null +++ b/app/node_modules/array-find-index/readme.md @@ -0,0 +1,30 @@ +# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index) + +> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save array-find-index +``` + + +## Usage + +```js +const arrayFindIndex = require('array-find-index'); + +arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn'); +//=> 1 +``` + + +## API + +Same as `Array#findIndex()`, but with the input array as the first argument. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/app/node_modules/asar/bin/asar.js b/app/node_modules/asar/bin/asar.js old mode 100644 new mode 100755 diff --git a/app/node_modules/asar/node_modules/glob/package.json b/app/node_modules/asar/node_modules/glob/package.json index 889a6bfd..c7356dce 100644 --- a/app/node_modules/asar/node_modules/glob/package.json +++ b/app/node_modules/asar/node_modules/glob/package.json @@ -1,27 +1,33 @@ { - "_from": "glob@^6.0.4", + "_args": [ + [ + "glob@6.0.4", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "glob@6.0.4", "_id": "glob@6.0.4", "_inBundle": false, "_integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "_location": "/asar/glob", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "glob@^6.0.4", + "raw": "glob@6.0.4", "name": "glob", "escapedName": "glob", - "rawSpec": "^6.0.4", + "rawSpec": "6.0.4", "saveSpec": null, - "fetchSpec": "^6.0.4" + "fetchSpec": "6.0.4" }, "_requiredBy": [ "/asar" ], "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "_shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22", - "_spec": "glob@^6.0.4", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\asar", + "_spec": "6.0.4", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -30,7 +36,6 @@ "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, - "bundleDependencies": false, "dependencies": { "inflight": "^1.0.4", "inherits": "2", @@ -38,7 +43,6 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, - "deprecated": false, "description": "a little globber", "devDependencies": { "mkdirp": "0", diff --git a/app/node_modules/asar/package.json b/app/node_modules/asar/package.json index 2525b44f..7d7a6271 100644 --- a/app/node_modules/asar/package.json +++ b/app/node_modules/asar/package.json @@ -1,5 +1,12 @@ { - "_from": "asar@^0.14.0", + "_args": [ + [ + "asar@0.14.3", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "asar@0.14.3", "_id": "asar@0.14.3", "_inBundle": false, "_integrity": "sha512-+hNnVVDmYbv05We/a9knj/98w171+A94A9DNHj+3kXUr3ENTQoSEcfbJRvBBRHyOh4vukBYWujmHvvaMmQoQbg==", @@ -12,29 +19,27 @@ "path-is-absolute": "1.0.1" }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "asar@^0.14.0", + "raw": "asar@0.14.3", "name": "asar", "escapedName": "asar", - "rawSpec": "^0.14.0", + "rawSpec": "0.14.3", "saveSpec": null, - "fetchSpec": "^0.14.0" + "fetchSpec": "0.14.3" }, "_requiredBy": [ "/electron-packager" ], "_resolved": "https://registry.npmjs.org/asar/-/asar-0.14.3.tgz", - "_shasum": "c72a81542a48e3bca459fb1b07ee2b6adfae265d", - "_spec": "asar@^0.14.0", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\electron-packager", + "_spec": "0.14.3", + "_where": "/home/s2/Documents/Code/gitlit/app", "bin": { "asar": "./bin/asar.js" }, "bugs": { "url": "https://github.com/electron/asar/issues" }, - "bundleDependencies": false, "dependencies": { "chromium-pickle-js": "^0.2.0", "commander": "^2.9.0", @@ -45,7 +50,6 @@ "mksnapshot": "^0.3.0", "tmp": "0.0.28" }, - "deprecated": false, "description": "Creating Electron app packages", "devDependencies": { "electron": "^1.6.2", diff --git a/app/node_modules/asn1/.npmignore b/app/node_modules/asn1/.npmignore new file mode 100644 index 00000000..eb03e3e1 --- /dev/null +++ b/app/node_modules/asn1/.npmignore @@ -0,0 +1,2 @@ +node_modules +*.log diff --git a/app/node_modules/asn1/.travis.yml b/app/node_modules/asn1/.travis.yml new file mode 100644 index 00000000..09d3ef37 --- /dev/null +++ b/app/node_modules/asn1/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.10 diff --git a/app/node_modules/asn1/LICENSE b/app/node_modules/asn1/LICENSE new file mode 100644 index 00000000..9b5dcdb7 --- /dev/null +++ b/app/node_modules/asn1/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Mark Cavage, 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/app/node_modules/asn1/README.md b/app/node_modules/asn1/README.md new file mode 100644 index 00000000..7cebf7a2 --- /dev/null +++ b/app/node_modules/asn1/README.md @@ -0,0 +1,50 @@ +node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. +Currently BER encoding is supported; at some point I'll likely have to do DER. + +## Usage + +Mostly, if you're *actually* needing to read and write ASN.1, you probably don't +need this readme to explain what and why. If you have no idea what ASN.1 is, +see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +The source is pretty much self-explanatory, and has read/write methods for the +common types out there. + +### Decoding + +The following reads an ASN.1 sequence with a boolean. + + var Ber = require('asn1').Ber; + + var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); + + reader.readSequence(); + console.log('Sequence len: ' + reader.length); + if (reader.peek() === Ber.Boolean) + console.log(reader.readBoolean()); + +### Encoding + +The following generates the same payload as above. + + var Ber = require('asn1').Ber; + + var writer = new Ber.Writer(); + + writer.startSequence(); + writer.writeBoolean(true); + writer.endSequence(); + + console.log(writer.buffer); + +## Installation + + npm install asn1 + +## License + +MIT. + +## Bugs + +See . diff --git a/app/node_modules/asn1/lib/ber/errors.js b/app/node_modules/asn1/lib/ber/errors.js new file mode 100644 index 00000000..ff21d4fa --- /dev/null +++ b/app/node_modules/asn1/lib/ber/errors.js @@ -0,0 +1,13 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + + newInvalidAsn1Error: function(msg) { + var e = new Error(); + e.name = 'InvalidAsn1Error'; + e.message = msg || ''; + return e; + } + +}; diff --git a/app/node_modules/asn1/lib/ber/index.js b/app/node_modules/asn1/lib/ber/index.js new file mode 100644 index 00000000..4fb90aea --- /dev/null +++ b/app/node_modules/asn1/lib/ber/index.js @@ -0,0 +1,27 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var errors = require('./errors'); +var types = require('./types'); + +var Reader = require('./reader'); +var Writer = require('./writer'); + + +///--- Exports + +module.exports = { + + Reader: Reader, + + Writer: Writer + +}; + +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} diff --git a/app/node_modules/asn1/lib/ber/reader.js b/app/node_modules/asn1/lib/ber/reader.js new file mode 100644 index 00000000..0a00e98e --- /dev/null +++ b/app/node_modules/asn1/lib/ber/reader.js @@ -0,0 +1,261 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); + +var ASN1 = require('./types'); +var errors = require('./errors'); + + +///--- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + + + +///--- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + + this._buf = data; + this._size = data.length; + + // These hold the "current" state + this._len = 0; + this._offset = 0; +} + +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); + +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); + + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function(peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; + + +Reader.prototype.peek = function() { + return this.readByte(true); +}; + + +/** + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 + */ +Reader.prototype.readLength = function(offset) { + if (offset === undefined) + offset = this._offset; + + if (offset >= this._size) + return null; + + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; + + if ((lenB & 0x80) == 0x80) { + lenB &= 0x7f; + + if (lenB == 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; + + +/** + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. + */ +Reader.prototype.readSequence = function(tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + this._offset = o; + return seq; +}; + + +Reader.prototype.readInt = function() { + return this._readTag(ASN1.Integer); +}; + + +Reader.prototype.readBoolean = function() { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; + + +Reader.prototype.readEnumeration = function() { + return this._readTag(ASN1.Enumeration); +}; + + +Reader.prototype.readString = function(tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + + var b = this.peek(); + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + + if (o === null) + return null; + + if (this.length > this._size - o) + return null; + + this._offset = o; + + if (this.length === 0) + return retbuf ? new Buffer(0) : ''; + + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + + return retbuf ? str : str.toString('utf8'); +}; + +Reader.prototype.readOID = function(tag) { + if (!tag) + tag = ASN1.OID; + + var b = this.readString(tag, true); + if (b === null) + return null; + + var values = []; + var value = 0; + + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) == 0) { + values.push(value); + value = 0; + } + } + + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); + + return values.join('.'); +}; + + +Reader.prototype._readTag = function(tag) { + assert.ok(tag !== undefined); + + var b = this.peek(); + + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); + + if (this.length > this._size - o) + return null; + this._offset = o; + + var fb = this._buf[this._offset]; + var value = 0; + + for (var i = 0; i < this.length; i++) { + value <<= 8; + value |= (this._buf[this._offset++] & 0xff); + } + + if ((fb & 0x80) == 0x80 && i !== 4) + value -= (1 << (i * 8)); + + return value >> 0; +}; + + + +///--- Exported API + +module.exports = Reader; diff --git a/app/node_modules/asn1/lib/ber/types.js b/app/node_modules/asn1/lib/ber/types.js new file mode 100644 index 00000000..8aea0001 --- /dev/null +++ b/app/node_modules/asn1/lib/ber/types.js @@ -0,0 +1,36 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 +}; diff --git a/app/node_modules/asn1/lib/ber/writer.js b/app/node_modules/asn1/lib/ber/writer.js new file mode 100644 index 00000000..d9d99af6 --- /dev/null +++ b/app/node_modules/asn1/lib/ber/writer.js @@ -0,0 +1,316 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var ASN1 = require('./types'); +var errors = require('./errors'); + + +///--- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + +var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 +}; + + +///--- Helpers + +function merge(from, to) { + assert.ok(from); + assert.equal(typeof(from), 'object'); + assert.ok(to); + assert.equal(typeof(to), 'object'); + + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function(key) { + if (to[key]) + return; + + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + + return to; +} + + + +///--- API + +function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + + this._buf = new Buffer(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw new InvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); + } +}); + +Writer.prototype.writeByte = function(b) { + if (typeof(b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; +}; + + +Writer.prototype.writeInt = function(i, tag) { + if (typeof(i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof(tag) !== 'number') + tag = ASN1.Integer; + + var sz = 4; + + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; + } + + if (sz > 4) + throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff'); + + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; + } + +}; + + +Writer.prototype.writeNull = function() { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; + + +Writer.prototype.writeEnumeration = function(i, tag) { + if (typeof(i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof(tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function(b, tag) { + if (typeof(b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof(tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function(s, tag) { + if (typeof(s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof(s) + ')'); + if (typeof(tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } +}; + + +Writer.prototype.writeBuffer = function(buf, tag) { + if (typeof(tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); + + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; + + +Writer.prototype.writeStringArray = function(strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function(s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function(s, tag) { + if (typeof(s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof(tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else { + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } + } + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function(b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function(b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function(len) { + if (typeof(len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw new InvalidAsn1ERror('Length too long (> 4 bytes)'); + } +}; + +Writer.prototype.startSequence = function(tag) { + if (typeof(tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function() { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw new InvalidAsn1Error('Sequence too long'); + } +}; + + +Writer.prototype._shift = function(start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function(len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = new Buffer(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } +}; + + + +///--- Exported API + +module.exports = Writer; diff --git a/app/node_modules/asn1/lib/index.js b/app/node_modules/asn1/lib/index.js new file mode 100644 index 00000000..d1766e7a --- /dev/null +++ b/app/node_modules/asn1/lib/index.js @@ -0,0 +1,20 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = require('./ber/index'); + + + +///--- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; diff --git a/app/node_modules/asn1/package.json b/app/node_modules/asn1/package.json new file mode 100644 index 00000000..ba6e6a71 --- /dev/null +++ b/app/node_modules/asn1/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "asn1@0.2.3", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "asn1@0.2.3", + "_id": "asn1@0.2.3", + "_inBundle": false, + "_integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "_location": "/asn1", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "asn1@0.2.3", + "name": "asn1", + "escapedName": "asn1", + "rawSpec": "0.2.3", + "saveSpec": null, + "fetchSpec": "0.2.3" + }, + "_requiredBy": [ + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "_spec": "0.2.3", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + "bugs": { + "url": "https://github.com/mcavage/node-asn1/issues" + }, + "contributors": [ + { + "name": "David Gwynne", + "email": "loki@animata.net" + }, + { + "name": "Yunong Xiao", + "email": "yunong@joyent.com" + }, + { + "name": "Alex Wilson", + "email": "alex.wilson@joyent.com" + } + ], + "dependencies": {}, + "description": "Contains parsers and serializers for ASN.1 (currently BER only)", + "devDependencies": { + "tap": "0.4.8" + }, + "homepage": "https://github.com/mcavage/node-asn1#readme", + "license": "MIT", + "main": "lib/index.js", + "name": "asn1", + "repository": { + "type": "git", + "url": "git://github.com/mcavage/node-asn1.git" + }, + "scripts": { + "test": "tap ./tst" + }, + "version": "0.2.3" +} diff --git a/app/node_modules/asn1/tst/ber/reader.test.js b/app/node_modules/asn1/tst/ber/reader.test.js new file mode 100644 index 00000000..062fd7ee --- /dev/null +++ b/app/node_modules/asn1/tst/ber/reader.test.js @@ -0,0 +1,208 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var test = require('tap').test; + + + +///--- Globals + +var BerReader; + + + +///--- Tests + +test('load library', function(t) { + BerReader = require('../../lib/index').BerReader; + t.ok(BerReader); + try { + new BerReader(); + t.fail('Should have thrown'); + } catch (e) { + t.ok(e instanceof TypeError, 'Should have been a type error'); + } + t.end(); +}); + + +test('read byte', function(t) { + var reader = new BerReader(new Buffer([0xde])); + t.ok(reader); + t.equal(reader.readByte(), 0xde, 'wrong value'); + t.end(); +}); + + +test('read 1 byte int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x01, 0x03])); + t.ok(reader); + t.equal(reader.readInt(), 0x03, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('read 2 byte int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde])); + t.ok(reader); + t.equal(reader.readInt(), 0x7ede, 'wrong value'); + t.equal(reader.length, 0x02, 'wrong length'); + t.end(); +}); + + +test('read 3 byte int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03])); + t.ok(reader); + t.equal(reader.readInt(), 0x7ede03, 'wrong value'); + t.equal(reader.length, 0x03, 'wrong length'); + t.end(); +}); + + +test('read 4 byte int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01])); + t.ok(reader); + t.equal(reader.readInt(), 0x7ede0301, 'wrong value'); + t.equal(reader.length, 0x04, 'wrong length'); + t.end(); +}); + + +test('read 1 byte negative int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x01, 0xdc])); + t.ok(reader); + t.equal(reader.readInt(), -36, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('read 2 byte negative int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x02, 0xc0, 0x4e])); + t.ok(reader); + t.equal(reader.readInt(), -16306, 'wrong value'); + t.equal(reader.length, 0x02, 'wrong length'); + t.end(); +}); + + +test('read 3 byte negative int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x03, 0xff, 0x00, 0x19])); + t.ok(reader); + t.equal(reader.readInt(), -65511, 'wrong value'); + t.equal(reader.length, 0x03, 'wrong length'); + t.end(); +}); + + +test('read 4 byte negative int', function(t) { + var reader = new BerReader(new Buffer([0x02, 0x04, 0x91, 0x7c, 0x22, 0x1f])); + t.ok(reader); + t.equal(reader.readInt(), -1854135777, 'wrong value'); + t.equal(reader.length, 0x04, 'wrong length'); + t.end(); +}); + + +test('read boolean true', function(t) { + var reader = new BerReader(new Buffer([0x01, 0x01, 0xff])); + t.ok(reader); + t.equal(reader.readBoolean(), true, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('read boolean false', function(t) { + var reader = new BerReader(new Buffer([0x01, 0x01, 0x00])); + t.ok(reader); + t.equal(reader.readBoolean(), false, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('read enumeration', function(t) { + var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20])); + t.ok(reader); + t.equal(reader.readEnumeration(), 0x20, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('read string', function(t) { + var dn = 'cn=foo,ou=unit,o=test'; + var buf = new Buffer(dn.length + 2); + buf[0] = 0x04; + buf[1] = Buffer.byteLength(dn); + buf.write(dn, 2); + var reader = new BerReader(buf); + t.ok(reader); + t.equal(reader.readString(), dn, 'wrong value'); + t.equal(reader.length, dn.length, 'wrong length'); + t.end(); +}); + + +test('read sequence', function(t) { + var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); + t.ok(reader); + t.equal(reader.readSequence(), 0x30, 'wrong value'); + t.equal(reader.length, 0x03, 'wrong length'); + t.equal(reader.readBoolean(), true, 'wrong value'); + t.equal(reader.length, 0x01, 'wrong length'); + t.end(); +}); + + +test('anonymous LDAPv3 bind', function(t) { + var BIND = new Buffer(14); + BIND[0] = 0x30; // Sequence + BIND[1] = 12; // len + BIND[2] = 0x02; // ASN.1 Integer + BIND[3] = 1; // len + BIND[4] = 0x04; // msgid (make up 4) + BIND[5] = 0x60; // Bind Request + BIND[6] = 7; // len + BIND[7] = 0x02; // ASN.1 Integer + BIND[8] = 1; // len + BIND[9] = 0x03; // v3 + BIND[10] = 0x04; // String (bind dn) + BIND[11] = 0; // len + BIND[12] = 0x80; // ContextSpecific (choice) + BIND[13] = 0; // simple bind + + // Start testing ^^ + var ber = new BerReader(BIND); + t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence'); + t.equal(ber.length, 12, 'Message length should be 12'); + t.equal(ber.readInt(), 4, 'Message id should have been 4'); + t.equal(ber.readSequence(), 96, 'Bind Request should have been 96'); + t.equal(ber.length, 7, 'Bind length should have been 7'); + t.equal(ber.readInt(), 3, 'LDAP version should have been 3'); + t.equal(ber.readString(), '', 'Bind DN should have been empty'); + t.equal(ber.length, 0, 'string length should have been 0'); + t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)'); + t.equal(ber.readByte(), 0, 'Should have been simple bind'); + t.equal(null, ber.readByte(), 'Should be out of data'); + t.end(); +}); + + +test('long string', function(t) { + var buf = new Buffer(256); + var o; + var s = + '2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' + + 'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' + + 'Teena Vradmin\'s description.'; + buf[0] = 0x04; + buf[1] = 0x81; + buf[2] = 0x94; + buf.write(s, 3); + var ber = new BerReader(buf.slice(0, 3 + s.length)); + t.equal(ber.readString(), s); + t.end(); +}); diff --git a/app/node_modules/asn1/tst/ber/writer.test.js b/app/node_modules/asn1/tst/ber/writer.test.js new file mode 100644 index 00000000..d87cb7bc --- /dev/null +++ b/app/node_modules/asn1/tst/ber/writer.test.js @@ -0,0 +1,370 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var test = require('tap').test; +var sys = require('sys'); + +///--- Globals + +var BerWriter; + +var BerReader; + + +///--- Tests + +test('load library', function(t) { + BerWriter = require('../../lib/index').BerWriter; + t.ok(BerWriter); + t.ok(new BerWriter()); + t.end(); +}); + + +test('write byte', function(t) { + var writer = new BerWriter(); + + writer.writeByte(0xC2); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 1, 'Wrong length'); + t.equal(ber[0], 0xC2, 'value wrong'); + + t.end(); +}); + + +test('write 1 byte int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(0x7f); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]); + t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]); + t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]); + + t.end(); +}); + + +test('write 2 byte int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(0x7ffe); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 4, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x02, 'length wrong'); + t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); + t.equal(ber[3], 0xfe, 'value wrong (byte 2)'); + + t.end(); +}); + + +test('write 3 byte int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(0x7ffffe); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 5, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x03, 'length wrong'); + t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); + t.equal(ber[3], 0xff, 'value wrong (byte 2)'); + t.equal(ber[4], 0xfe, 'value wrong (byte 3)'); + + t.end(); +}); + + +test('write 4 byte int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(0x7ffffffe); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 6, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x04, 'length wrong'); + t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); + t.equal(ber[3], 0xff, 'value wrong (byte 2)'); + t.equal(ber[4], 0xff, 'value wrong (byte 3)'); + t.equal(ber[5], 0xfe, 'value wrong (byte 4)'); + + t.end(); +}); + + +test('write 1 byte negative int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(-128); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 3, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x01, 'length wrong'); + t.equal(ber[2], 0x80, 'value wrong (byte 1)'); + + t.end(); +}); + + +test('write 2 byte negative int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(-22400); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 4, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x02, 'length wrong'); + t.equal(ber[2], 0xa8, 'value wrong (byte 1)'); + t.equal(ber[3], 0x80, 'value wrong (byte 2)'); + + t.end(); +}); + + +test('write 3 byte negative int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(-481653); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 5, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x03, 'length wrong'); + t.equal(ber[2], 0xf8, 'value wrong (byte 1)'); + t.equal(ber[3], 0xa6, 'value wrong (byte 2)'); + t.equal(ber[4], 0x8b, 'value wrong (byte 3)'); + + t.end(); +}); + + +test('write 4 byte negative int', function(t) { + var writer = new BerWriter(); + + writer.writeInt(-1522904131); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 6, 'Wrong length for an int'); + t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); + t.equal(ber[1], 0x04, 'length wrong'); + t.equal(ber[2], 0xa5, 'value wrong (byte 1)'); + t.equal(ber[3], 0x3a, 'value wrong (byte 2)'); + t.equal(ber[4], 0x53, 'value wrong (byte 3)'); + t.equal(ber[5], 0xbd, 'value wrong (byte 4)'); + + t.end(); +}); + + +test('write boolean', function(t) { + var writer = new BerWriter(); + + writer.writeBoolean(true); + writer.writeBoolean(false); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 6, 'Wrong length'); + t.equal(ber[0], 0x01, 'tag wrong'); + t.equal(ber[1], 0x01, 'length wrong'); + t.equal(ber[2], 0xff, 'value wrong'); + t.equal(ber[3], 0x01, 'tag wrong'); + t.equal(ber[4], 0x01, 'length wrong'); + t.equal(ber[5], 0x00, 'value wrong'); + + t.end(); +}); + + +test('write string', function(t) { + var writer = new BerWriter(); + writer.writeString('hello world'); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 13, 'wrong length'); + t.equal(ber[0], 0x04, 'wrong tag'); + t.equal(ber[1], 11, 'wrong length'); + t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); + + t.end(); +}); + +test('write buffer', function(t) { + var writer = new BerWriter(); + // write some stuff to start with + writer.writeString('hello world'); + var ber = writer.buffer; + var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01, + 0xff, 0x01, 0x01, 0xff]); + writer.writeBuffer(buf.slice(2, buf.length), 0x04); + ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 26, 'wrong length'); + t.equal(ber[0], 0x04, 'wrong tag'); + t.equal(ber[1], 11, 'wrong length'); + t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); + t.equal(ber[13], buf[0], 'wrong tag'); + t.equal(ber[14], buf[1], 'wrong length'); + for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) { + t.equal(ber[i], buf[j], 'buffer contents not identical'); + } + t.end(); +}); + +test('write string array', function(t) { + var writer = new BerWriter(); + writer.writeStringArray(['hello world', 'fubar!']); + var ber = writer.buffer; + + t.ok(ber); + + t.equal(ber.length, 21, 'wrong length'); + t.equal(ber[0], 0x04, 'wrong tag'); + t.equal(ber[1], 11, 'wrong length'); + t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); + + t.equal(ber[13], 0x04, 'wrong tag'); + t.equal(ber[14], 6, 'wrong length'); + t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value'); + + t.end(); +}); + + +test('resize internal buffer', function(t) { + var writer = new BerWriter({size: 2}); + writer.writeString('hello world'); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 13, 'wrong length'); + t.equal(ber[0], 0x04, 'wrong tag'); + t.equal(ber[1], 11, 'wrong length'); + t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); + + t.end(); +}); + + +test('sequence', function(t) { + var writer = new BerWriter({size: 25}); + writer.startSequence(); + writer.writeString('hello world'); + writer.endSequence(); + var ber = writer.buffer; + + t.ok(ber); + console.log(ber); + t.equal(ber.length, 15, 'wrong length'); + t.equal(ber[0], 0x30, 'wrong tag'); + t.equal(ber[1], 13, 'wrong length'); + t.equal(ber[2], 0x04, 'wrong tag'); + t.equal(ber[3], 11, 'wrong length'); + t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value'); + + t.end(); +}); + + +test('nested sequence', function(t) { + var writer = new BerWriter({size: 25}); + writer.startSequence(); + writer.writeString('hello world'); + writer.startSequence(); + writer.writeString('hello world'); + writer.endSequence(); + writer.endSequence(); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 30, 'wrong length'); + t.equal(ber[0], 0x30, 'wrong tag'); + t.equal(ber[1], 28, 'wrong length'); + t.equal(ber[2], 0x04, 'wrong tag'); + t.equal(ber[3], 11, 'wrong length'); + t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value'); + t.equal(ber[15], 0x30, 'wrong tag'); + t.equal(ber[16], 13, 'wrong length'); + t.equal(ber[17], 0x04, 'wrong tag'); + t.equal(ber[18], 11, 'wrong length'); + t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value'); + + t.end(); +}); + + +test('LDAP bind message', function(t) { + var dn = 'cn=foo,ou=unit,o=test'; + var writer = new BerWriter(); + writer.startSequence(); + writer.writeInt(3); // msgid = 3 + writer.startSequence(0x60); // ldap bind + writer.writeInt(3); // ldap v3 + writer.writeString(dn); + writer.writeByte(0x80); + writer.writeByte(0x00); + writer.endSequence(); + writer.endSequence(); + var ber = writer.buffer; + + t.ok(ber); + t.equal(ber.length, 35, 'wrong length (buffer)'); + t.equal(ber[0], 0x30, 'wrong tag'); + t.equal(ber[1], 33, 'wrong length'); + t.equal(ber[2], 0x02, 'wrong tag'); + t.equal(ber[3], 1, 'wrong length'); + t.equal(ber[4], 0x03, 'wrong value'); + t.equal(ber[5], 0x60, 'wrong tag'); + t.equal(ber[6], 28, 'wrong length'); + t.equal(ber[7], 0x02, 'wrong tag'); + t.equal(ber[8], 1, 'wrong length'); + t.equal(ber[9], 0x03, 'wrong value'); + t.equal(ber[10], 0x04, 'wrong tag'); + t.equal(ber[11], dn.length, 'wrong length'); + t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value'); + t.equal(ber[33], 0x80, 'wrong tag'); + t.equal(ber[34], 0x00, 'wrong len'); + + t.end(); +}); + + +test('Write OID', function(t) { + var oid = '1.2.840.113549.1.1.1'; + var writer = new BerWriter(); + writer.writeOID(oid); + + var ber = writer.buffer; + t.ok(ber); + console.log(require('util').inspect(ber)); + console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86, + 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x01]))); + + t.end(); +}); diff --git a/app/node_modules/assert-plus/AUTHORS b/app/node_modules/assert-plus/AUTHORS new file mode 100644 index 00000000..1923524f --- /dev/null +++ b/app/node_modules/assert-plus/AUTHORS @@ -0,0 +1,6 @@ +Dave Eddy +Fred Kuo +Lars-Magnus Skog +Mark Cavage +Patrick Mooney +Rob Gulewich diff --git a/app/node_modules/assert-plus/CHANGES.md b/app/node_modules/assert-plus/CHANGES.md new file mode 100644 index 00000000..57d92bfd --- /dev/null +++ b/app/node_modules/assert-plus/CHANGES.md @@ -0,0 +1,14 @@ +# assert-plus Changelog + +## 1.0.0 + +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input +- Add assert.finite check. Previous assert.number callers should use this if + they expect Infinity inputs to throw. + +## 0.2.0 + +- Fix `assert.object(null)` so it throws +- Fix optional/arrayOf exports for non-type-of asserts +- Add optiona/arrayOf exports for Stream/Date/Regex/uuid +- Add basic unit test coverage diff --git a/app/node_modules/assert-plus/README.md b/app/node_modules/assert-plus/README.md new file mode 100644 index 00000000..ec200d16 --- /dev/null +++ b/app/node_modules/assert-plus/README.md @@ -0,0 +1,162 @@ +# assert-plus + +This library is a super small wrapper over node's assert module that has two +things: (1) the ability to disable assertions with the environment variable +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like +`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks +like this: + +```javascript + var assert = require('assert-plus'); + + function fooAccount(options, callback) { + assert.object(options, 'options'); + assert.number(options.id, 'options.id'); + assert.bool(options.isManager, 'options.isManager'); + assert.string(options.name, 'options.name'); + assert.arrayOfString(options.email, 'options.email'); + assert.func(callback, 'callback'); + + // Do stuff + callback(null, {}); + } +``` + +# API + +All methods that *aren't* part of node's core assert API are simply assumed to +take an argument, and then a string 'name' that's not a message; `AssertionError` +will be thrown if the assertion fails with a message like: + + AssertionError: foo (string) is required + at test (/home/mark/work/foo/foo.js:3:9) + at Object. (/home/mark/work/foo/foo.js:15:1) + at Module._compile (module.js:446:26) + at Object..js (module.js:464:10) + at Module.load (module.js:353:31) + at Function._load (module.js:311:12) + at Array.0 (module.js:484:10) + at EventEmitter._tickCallback (node.js:190:38) + +from: + +```javascript + function test(foo) { + assert.string(foo, 'foo'); + } +``` + +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: + +```javascript + function test(foo) { + assert.arrayOfString(foo, 'foo'); + } +``` + +You can assert IFF an argument is not `undefined` (i.e., an optional arg): + +```javascript + assert.optionalString(foo, 'foo'); +``` + +Lastly, you can opt-out of assertion checking altogether by setting the +environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have +lots of assertions, and don't want to pay `typeof ()` taxes to v8 in +production. Be advised: The standard functions re-exported from `assert` are +also disabled in assert-plus if NDEBUG is specified. Using them directly from +the `assert` module avoids this behavior. + +The complete list of APIs is: + +* assert.array +* assert.bool +* assert.buffer +* assert.func +* assert.number +* assert.finite +* assert.object +* assert.string +* assert.stream +* assert.date +* assert.regexp +* assert.uuid +* assert.arrayOfArray +* assert.arrayOfBool +* assert.arrayOfBuffer +* assert.arrayOfFunc +* assert.arrayOfNumber +* assert.arrayOfFinite +* assert.arrayOfObject +* assert.arrayOfString +* assert.arrayOfStream +* assert.arrayOfDate +* assert.arrayOfRegexp +* assert.arrayOfUuid +* assert.optionalArray +* assert.optionalBool +* assert.optionalBuffer +* assert.optionalFunc +* assert.optionalNumber +* assert.optionalFinite +* assert.optionalObject +* assert.optionalString +* assert.optionalStream +* assert.optionalDate +* assert.optionalRegexp +* assert.optionalUuid +* assert.optionalArrayOfArray +* assert.optionalArrayOfBool +* assert.optionalArrayOfBuffer +* assert.optionalArrayOfFunc +* assert.optionalArrayOfNumber +* assert.optionalArrayOfFinite +* assert.optionalArrayOfObject +* assert.optionalArrayOfString +* assert.optionalArrayOfStream +* assert.optionalArrayOfDate +* assert.optionalArrayOfRegexp +* assert.optionalArrayOfUuid +* assert.AssertionError +* assert.fail +* assert.ok +* assert.equal +* assert.notEqual +* assert.deepEqual +* assert.notDeepEqual +* assert.strictEqual +* assert.notStrictEqual +* assert.throws +* assert.doesNotThrow +* assert.ifError + +# Installation + + npm install assert-plus + +## License + +The MIT License (MIT) +Copyright (c) 2012 Mark Cavage + +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. + +## Bugs + +See . diff --git a/app/node_modules/assert-plus/assert.js b/app/node_modules/assert-plus/assert.js new file mode 100644 index 00000000..26f944ee --- /dev/null +++ b/app/node_modules/assert-plus/assert.js @@ -0,0 +1,211 @@ +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = require('assert'); +var Stream = require('stream').Stream; +var util = require('util'); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/app/node_modules/assert-plus/package.json b/app/node_modules/assert-plus/package.json new file mode 100644 index 00000000..63f2e8c3 --- /dev/null +++ b/app/node_modules/assert-plus/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "assert-plus@1.0.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "assert-plus@1.0.0", + "_id": "assert-plus@1.0.0", + "_inBundle": false, + "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "_location": "/assert-plus", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "assert-plus@1.0.0", + "name": "assert-plus", + "escapedName": "assert-plus", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/dashdash", + "/getpass", + "/http-signature", + "/jsprim", + "/sshpk", + "/verror" + ], + "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + "bugs": { + "url": "https://github.com/mcavage/node-assert-plus/issues" + }, + "contributors": [ + { + "name": "Dave Eddy", + "email": "dave@daveeddy.com" + }, + { + "name": "Fred Kuo", + "email": "fred.kuo@joyent.com" + }, + { + "name": "Lars-Magnus Skog", + "email": "ralphtheninja@riseup.net" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "Patrick Mooney", + "email": "pmooney@pfmooney.com" + }, + { + "name": "Rob Gulewich", + "email": "robert.gulewich@joyent.com" + } + ], + "dependencies": {}, + "description": "Extra assertions on top of node's assert module", + "devDependencies": { + "faucet": "0.0.1", + "tape": "4.2.2" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/mcavage/node-assert-plus#readme", + "license": "MIT", + "main": "./assert.js", + "name": "assert-plus", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/mcavage/node-assert-plus.git" + }, + "scripts": { + "test": "tape tests/*.js | ./node_modules/.bin/faucet" + }, + "version": "1.0.0" +} diff --git a/app/node_modules/asynckit/LICENSE b/app/node_modules/asynckit/LICENSE new file mode 100644 index 00000000..c9eca5dd --- /dev/null +++ b/app/node_modules/asynckit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +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/app/node_modules/asynckit/README.md b/app/node_modules/asynckit/README.md new file mode 100644 index 00000000..ddcc7e6b --- /dev/null +++ b/app/node_modules/asynckit/README.md @@ -0,0 +1,233 @@ +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) + +Minimal async jobs utility library, with streams support. + +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) + +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) + + + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/app/node_modules/asynckit/bench.js b/app/node_modules/asynckit/bench.js new file mode 100644 index 00000000..c612f1a5 --- /dev/null +++ b/app/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/app/node_modules/asynckit/index.js b/app/node_modules/asynckit/index.js new file mode 100644 index 00000000..455f9454 --- /dev/null +++ b/app/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/app/node_modules/asynckit/lib/abort.js b/app/node_modules/asynckit/lib/abort.js new file mode 100644 index 00000000..114367e5 --- /dev/null +++ b/app/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/app/node_modules/asynckit/lib/async.js b/app/node_modules/asynckit/lib/async.js new file mode 100644 index 00000000..7f1288a4 --- /dev/null +++ b/app/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/app/node_modules/asynckit/lib/defer.js b/app/node_modules/asynckit/lib/defer.js new file mode 100644 index 00000000..b67110c7 --- /dev/null +++ b/app/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/app/node_modules/asynckit/lib/iterate.js b/app/node_modules/asynckit/lib/iterate.js new file mode 100644 index 00000000..5d2839a5 --- /dev/null +++ b/app/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/app/node_modules/asynckit/lib/readable_asynckit.js b/app/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 00000000..78ad240f --- /dev/null +++ b/app/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/app/node_modules/asynckit/lib/readable_parallel.js b/app/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 00000000..5d2929f7 --- /dev/null +++ b/app/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/app/node_modules/asynckit/lib/readable_serial.js b/app/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 00000000..78226982 --- /dev/null +++ b/app/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/app/node_modules/asynckit/lib/readable_serial_ordered.js b/app/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 00000000..3de89c47 --- /dev/null +++ b/app/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/app/node_modules/asynckit/lib/state.js b/app/node_modules/asynckit/lib/state.js new file mode 100644 index 00000000..cbea7ad8 --- /dev/null +++ b/app/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/app/node_modules/asynckit/lib/streamify.js b/app/node_modules/asynckit/lib/streamify.js new file mode 100644 index 00000000..f56a1c92 --- /dev/null +++ b/app/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/app/node_modules/asynckit/lib/terminator.js b/app/node_modules/asynckit/lib/terminator.js new file mode 100644 index 00000000..d6eb9921 --- /dev/null +++ b/app/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/app/node_modules/asynckit/package.json b/app/node_modules/asynckit/package.json new file mode 100644 index 00000000..ddacfe85 --- /dev/null +++ b/app/node_modules/asynckit/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "asynckit@0.4.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "asynckit@0.4.0", + "_id": "asynckit@0.4.0", + "_inBundle": false, + "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "_location": "/asynckit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "asynckit@0.4.0", + "name": "asynckit", + "escapedName": "asynckit", + "rawSpec": "0.4.0", + "saveSpec": null, + "fetchSpec": "0.4.0" + }, + "_requiredBy": [ + "/form-data" + ], + "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "_spec": "0.4.0", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Alex Indigo", + "email": "iam@alexindigo.com" + }, + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "dependencies": {}, + "description": "Minimal async jobs utility library, with streams support", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "license": "MIT", + "main": "index.js", + "name": "asynckit", + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "clean": "rimraf coverage", + "debug": "tape test/test-*.js", + "lint": "eslint *.js lib/*.js test/*.js", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js" + }, + "version": "0.4.0" +} diff --git a/app/node_modules/asynckit/parallel.js b/app/node_modules/asynckit/parallel.js new file mode 100644 index 00000000..3c50344d --- /dev/null +++ b/app/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/app/node_modules/asynckit/serial.js b/app/node_modules/asynckit/serial.js new file mode 100644 index 00000000..6cd949a6 --- /dev/null +++ b/app/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/app/node_modules/asynckit/serialOrdered.js b/app/node_modules/asynckit/serialOrdered.js new file mode 100644 index 00000000..607eafea --- /dev/null +++ b/app/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/app/node_modules/asynckit/stream.js b/app/node_modules/asynckit/stream.js new file mode 100644 index 00000000..d43465f9 --- /dev/null +++ b/app/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/app/node_modules/author-regex/package.json b/app/node_modules/author-regex/package.json index 4aa885c3..149b9cb4 100644 --- a/app/node_modules/author-regex/package.json +++ b/app/node_modules/author-regex/package.json @@ -1,27 +1,33 @@ { - "_from": "author-regex@^1.0.0", + "_args": [ + [ + "author-regex@1.0.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "author-regex@1.0.0", "_id": "author-regex@1.0.0", "_inBundle": false, "_integrity": "sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA=", "_location": "/author-regex", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "author-regex@^1.0.0", + "raw": "author-regex@1.0.0", "name": "author-regex", "escapedName": "author-regex", - "rawSpec": "^1.0.0", + "rawSpec": "1.0.0", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "1.0.0" }, "_requiredBy": [ "/parse-author" ], "_resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz", - "_shasum": "d08885be6b9bbf9439fe087c76287245f0a81450", - "_spec": "author-regex@^1.0.0", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\parse-author", + "_spec": "1.0.0", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" @@ -29,8 +35,6 @@ "bugs": { "url": "https://github.com/jonschlinkert/author-regex/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Regular expression for parsing an `author` string into an object following npm conventions.", "devDependencies": { "gulp-format-md": "^0.1.11", diff --git a/app/node_modules/aws-sign2/LICENSE b/app/node_modules/aws-sign2/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/app/node_modules/aws-sign2/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/app/node_modules/aws-sign2/README.md b/app/node_modules/aws-sign2/README.md new file mode 100644 index 00000000..763564e0 --- /dev/null +++ b/app/node_modules/aws-sign2/README.md @@ -0,0 +1,4 @@ +aws-sign +======== + +AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/app/node_modules/aws-sign2/index.js b/app/node_modules/aws-sign2/index.js new file mode 100644 index 00000000..fb35f6db --- /dev/null +++ b/app/node_modules/aws-sign2/index.js @@ -0,0 +1,212 @@ + +/*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Module dependencies. + */ + +var crypto = require('crypto') + , parse = require('url').parse + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) + } + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') +} +module.exports.canonicalizeResource = canonicalizeResource diff --git a/app/node_modules/aws-sign2/package.json b/app/node_modules/aws-sign2/package.json new file mode 100644 index 00000000..dfafb254 --- /dev/null +++ b/app/node_modules/aws-sign2/package.json @@ -0,0 +1,54 @@ +{ + "_args": [ + [ + "aws-sign2@0.7.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "aws-sign2@0.7.0", + "_id": "aws-sign2@0.7.0", + "_inBundle": false, + "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "_location": "/aws-sign2", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "aws-sign2@0.7.0", + "name": "aws-sign2", + "escapedName": "aws-sign2", + "rawSpec": "0.7.0", + "saveSpec": null, + "fetchSpec": "0.7.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "_spec": "0.7.0", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/aws-sign/issues" + }, + "dependencies": {}, + "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", + "devDependencies": {}, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/mikeal/aws-sign#readme", + "license": "Apache-2.0", + "main": "index.js", + "name": "aws-sign2", + "optionalDependencies": {}, + "repository": { + "url": "git+https://github.com/mikeal/aws-sign.git" + }, + "version": "0.7.0" +} diff --git a/app/node_modules/aws4/.travis.yml b/app/node_modules/aws4/.travis.yml new file mode 100644 index 00000000..61d06340 --- /dev/null +++ b/app/node_modules/aws4/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.12" + - "4.2" diff --git a/app/node_modules/aws4/LICENSE b/app/node_modules/aws4/LICENSE new file mode 100644 index 00000000..4f321e59 --- /dev/null +++ b/app/node_modules/aws4/LICENSE @@ -0,0 +1,19 @@ +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/app/node_modules/aws4/README.md b/app/node_modules/aws4/README.md new file mode 100644 index 00000000..6b002d02 --- /dev/null +++ b/app/node_modules/aws4/README.md @@ -0,0 +1,523 @@ +aws4 +---- + +[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) + +A small utility to sign vanilla node.js http(s) request options using Amazon's +[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). + +Can also be used [in the browser](./browser). + +This signature is supported by nearly all Amazon services, including +[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), +[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), +[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), +[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), +[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), +[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), +[SNS](http://docs.aws.amazon.com/sns/latest/api/), +[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), +[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), +[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), +[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), +[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), +[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), +[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), +[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), +[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), +[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), +[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), +[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), +[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), +[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), +[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), +[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), +[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), +[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), +[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), +[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), +[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), +[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), +[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), +[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), +[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), +[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), +[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), +[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), +[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), +[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), +[Config](http://docs.aws.amazon.com/config/latest/APIReference/), +[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), +[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and +[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). + +Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are +[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and +[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) +(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). + +It also provides defaults for a number of core AWS headers and +request parameters, making it very easy to query AWS services, or +build out a fully-featured AWS library. + +Example +------- + +```javascript +var http = require('http'), + https = require('https'), + aws4 = require('aws4') + +// given an options object you could pass to http.request +var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} + +// alternatively (as aws4 can infer the host): +opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} + +// alternatively (as us-east-1 is default): +opts = {service: 'sqs', path: '/?Action=ListQueues'} + +aws4.sign(opts) // assumes AWS credentials are available in process.env + +console.log(opts) +/* +{ + host: 'sqs.us-east-1.amazonaws.com', + path: '/?Action=ListQueues', + headers: { + Host: 'sqs.us-east-1.amazonaws.com', + 'X-Amz-Date': '20121226T061030Z', + Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' + } +} +*/ + +// we can now use this to query AWS using the standard node.js http API +http.request(opts, function(res) { res.pipe(process.stdout) }).end() +/* + + +... +*/ +``` + +More options +------------ + +```javascript +// you can also pass AWS credentials in explicitly (otherwise taken from process.env) +aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) + +// can also add the signature to query strings +aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) + +// create a utility function to pipe to stdout (with https this time) +function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } + +// aws4 can infer the HTTP method if a body is passed in +// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' +request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) +/* + +... +*/ + +// can specify any custom option or header as per usual +request(aws4.sign({ + service: 'dynamodb', + region: 'ap-southeast-2', + method: 'POST', + path: '/', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'DynamoDB_20120810.ListTables' + }, + body: '{}' +})) +/* +{"TableNames":[]} +... +*/ + +// works with all other services that support Signature Version 4 + +request(aws4.sign({service: 's3', path: '/', signQuery: true})) +/* + +... +*/ + +request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) +/* + +... +*/ + +request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) +/* + +... +*/ + +request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) +/* + +... +*/ + +request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) +/* + +... +*/ + +request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) +/* + +... +*/ + +request(aws4.sign({service: 'appstream', path: '/applications'})) +/* +{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... +... +*/ + +request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) +/* +{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} +... +*/ + +request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) +/* +{"NextPageToken":null,"Pipelines":[]} +... +*/ + +request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) +/* +{"Functions":[],"NextMarker":null} +... +*/ + +request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) +/* + +... +*/ + +request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) +/* +{"Marker":null,"VaultList":[]} +... +*/ + +request(aws4.sign({service: 'storagegateway', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' +}})) +/* +{"Gateways":[]} +... +*/ + +request(aws4.sign({service: 'datapipeline', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'DataPipeline.ListPipelines' +}})) +/* +{"hasMoreResults":false,"pipelineIdList":[]} +... +*/ + +request(aws4.sign({service: 'opsworks', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' +}})) +/* +{"Stacks":[]} +... +*/ + +request(aws4.sign({service: 'route53domains', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' +}})) +/* +{"Domains":[]} +... +*/ + +request(aws4.sign({service: 'kinesis', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Kinesis_20131202.ListStreams' +}})) +/* +{"HasMoreStreams":false,"StreamNames":[]} +... +*/ + +request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' +}})) +/* +{"trailList":[]} +... +*/ + +request(aws4.sign({service: 'logs', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' +}})) +/* +{"logGroups":[]} +... +*/ + +request(aws4.sign({service: 'codedeploy', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' +}})) +/* +{"applications":[]} +... +*/ + +request(aws4.sign({service: 'directconnect', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'OvertureService.DescribeConnections' +}})) +/* +{"connections":[]} +... +*/ + +request(aws4.sign({service: 'kms', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'TrentService.ListKeys' +}})) +/* +{"Keys":[],"Truncated":false} +... +*/ + +request(aws4.sign({service: 'config', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' +}})) +/* +{"DeliveryChannels":[]} +... +*/ + +request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' +}})) +/* +{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} +... +*/ + +request(aws4.sign({ + service: 'swf', + body: '{"registrationStatus":"REGISTERED"}', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' + } +})) +/* +{"domainInfos":[]} +... +*/ + +request(aws4.sign({ + service: 'cognito-identity', + body: '{"MaxResults": 1}', + headers: { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' + } +})) +/* +{"IdentityPools":[]} +... +*/ + +request(aws4.sign({ + service: 'mobileanalytics', + path: '/2014-06-05/events', + body: JSON.stringify({events:[{ + eventType: 'a', + timestamp: new Date().toISOString(), + session: {}, + }]}), + headers: { + 'Content-Type': 'application/json', + 'X-Amz-Client-Context': JSON.stringify({ + client: {client_id: 'a', app_title: 'a'}, + custom: {}, + env: {platform: 'a'}, + services: {}, + }), + } +})) +/* +(HTTP 202, empty response) +*/ + +// Generate CodeCommit Git access password +var signer = new aws4.RequestSigner({ + service: 'codecommit', + host: 'git-codecommit.us-east-1.amazonaws.com', + method: 'GIT', + path: '/v1/repos/MyAwesomeRepo', +}) +var password = signer.getDateTime() + 'Z' + signer.signature() +``` + +API +--- + +### aws4.sign(requestOptions, [credentials]) + +This calculates and populates the `Authorization` header of +`requestOptions`, and any other necessary AWS headers and/or request +options. Returns `requestOptions` as a convenience for chaining. + +`requestOptions` is an object holding the same options that the node.js +[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) +function takes. + +The following properties of `requestOptions` are used in the signing or +populated if they don't already exist: + +- `hostname` or `host` (will be determined from `service` and `region` if not given) +- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) +- `path` (will use `'/'` if not given) +- `body` (will use `''` if not given) +- `service` (will be calculated from `hostname` or `host` if not given) +- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) +- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) +- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` + if not given and there is a `body`) +- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) + +Your AWS credentials (which can be found in your +[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) +can be specified in one of two ways: + +- As the second argument, like this: + +```javascript +aws4.sign(requestOptions, { + secretAccessKey: "", + accessKeyId: "", + sessionToken: "" +}) +``` + +- From `process.env`, such as this: + +``` +export AWS_SECRET_ACCESS_KEY="" +export AWS_ACCESS_KEY_ID="" +export AWS_SESSION_TOKEN="" +``` + +(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) + +The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing +with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). + +Installation +------------ + +With [npm](http://npmjs.org/) do: + +``` +npm install aws4 +``` + +Can also be used [in the browser](./browser). + +Thanks +------ + +Thanks to [@jed](https://github.com/jed) for his +[dynamo-client](https://github.com/jed/dynamo-client) lib where I first +committed and subsequently extracted this code. + +Also thanks to the +[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving +me a start on implementing the v4 signature. + diff --git a/app/node_modules/aws4/aws4.js b/app/node_modules/aws4/aws4.js new file mode 100644 index 00000000..8e73d44b --- /dev/null +++ b/app/node_modules/aws4/aws4.js @@ -0,0 +1,332 @@ +var aws4 = exports, + url = require('url'), + querystring = require('querystring'), + crypto = require('crypto'), + lru = require('./lru'), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : + (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, + service = this.service === 'ses' ? 'email' : this.service + return service + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' + } else { + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { + if (!key) return obj + obj[key] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key].slice().sort()) + return obj + }, {}))) + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece) + path.push(encodeRfc3986(encodeURIComponent(piece))) + } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .sort() + .join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/', + queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { + path = path.split('/').map(function(piece) { + return encodeURIComponent(decodeURIComponent(piece)) + }).join('/') + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} diff --git a/app/node_modules/aws4/lru.js b/app/node_modules/aws4/lru.js new file mode 100644 index 00000000..333f66a4 --- /dev/null +++ b/app/node_modules/aws4/lru.js @@ -0,0 +1,96 @@ +module.exports = function(size) { + return new LruCache(size) +} + +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val + } else { + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- + } + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ + } +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null + } else { + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node + } +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) + } + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next + } + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null +} diff --git a/app/node_modules/aws4/package.json b/app/node_modules/aws4/package.json new file mode 100644 index 00000000..bd87ff90 --- /dev/null +++ b/app/node_modules/aws4/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "aws4@1.7.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "aws4@1.7.0", + "_id": "aws4@1.7.0", + "_inBundle": false, + "_integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "_location": "/aws4", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "aws4@1.7.0", + "name": "aws4", + "escapedName": "aws4", + "rawSpec": "1.7.0", + "saveSpec": null, + "fetchSpec": "1.7.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "_spec": "1.7.0", + "_where": "/home/s2/Documents/Code/gitlit/app", + "author": { + "name": "Michael Hart", + "email": "michael.hart.au@gmail.com", + "url": "http://github.com/mhart" + }, + "bugs": { + "url": "https://github.com/mhart/aws4/issues" + }, + "description": "Signs and prepares requests using AWS Signature Version 4", + "devDependencies": { + "mocha": "^2.4.5", + "should": "^8.2.2" + }, + "homepage": "https://github.com/mhart/aws4#readme", + "keywords": [ + "amazon", + "aws", + "signature", + "s3", + "ec2", + "autoscaling", + "cloudformation", + "elasticloadbalancing", + "elb", + "elasticbeanstalk", + "cloudsearch", + "dynamodb", + "kinesis", + "lambda", + "glacier", + "sqs", + "sns", + "iam", + "sts", + "ses", + "swf", + "storagegateway", + "datapipeline", + "directconnect", + "redshift", + "opsworks", + "rds", + "monitoring", + "cloudtrail", + "cloudfront", + "codedeploy", + "elasticache", + "elasticmapreduce", + "elastictranscoder", + "emr", + "cloudwatch", + "mobileanalytics", + "cognitoidentity", + "cognitosync", + "cognito", + "containerservice", + "ecs", + "appstream", + "keymanagementservice", + "kms", + "config", + "cloudhsm", + "route53", + "route53domains", + "logs" + ], + "license": "MIT", + "main": "aws4.js", + "name": "aws4", + "repository": { + "type": "git", + "url": "git+https://github.com/mhart/aws4.git" + }, + "scripts": { + "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" + }, + "version": "1.7.0" +} diff --git a/app/node_modules/balanced-match/.npmignore b/app/node_modules/balanced-match/.npmignore new file mode 100644 index 00000000..ae5d8c36 --- /dev/null +++ b/app/node_modules/balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/app/node_modules/balanced-match/LICENSE.md b/app/node_modules/balanced-match/LICENSE.md new file mode 100644 index 00000000..2cdc8e41 --- /dev/null +++ b/app/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(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/app/node_modules/balanced-match/README.md b/app/node_modules/balanced-match/README.md new file mode 100644 index 00000000..08e918c0 --- /dev/null +++ b/app/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# 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/app/node_modules/balanced-match/index.js b/app/node_modules/balanced-match/index.js new file mode 100644 index 00000000..1685a762 --- /dev/null +++ b/app/node_modules/balanced-match/index.js @@ -0,0 +1,59 @@ +'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/app/node_modules/balanced-match/package.json b/app/node_modules/balanced-match/package.json new file mode 100644 index 00000000..c1176e02 --- /dev/null +++ b/app/node_modules/balanced-match/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "balanced-match@1.0.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_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": "/home/s2/Documents/Code/gitlit/app", + "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/app/node_modules/base64-js/package.json b/app/node_modules/base64-js/package.json index 66226e2e..84d323e2 100644 --- a/app/node_modules/base64-js/package.json +++ b/app/node_modules/base64-js/package.json @@ -1,4 +1,11 @@ { + "_args": [ + [ + "base64-js@1.2.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, "_from": "base64-js@1.2.0", "_id": "base64-js@1.2.0", "_inBundle": false, @@ -19,9 +26,8 @@ "/plist" ], "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "_shasum": "a39992d723584811982be5e290bb6a53d86700f1", - "_spec": "base64-js@1.2.0", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\plist", + "_spec": "1.2.0", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "T. Jameson Little", "email": "t.jameson.little@gmail.com" @@ -29,8 +35,6 @@ "bugs": { "url": "https://github.com/beatgammit/base64-js/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Base64 encoding/decoding in pure JS", "devDependencies": { "benchmark": "^2.1.0", diff --git a/app/node_modules/bcrypt-pbkdf/README.md b/app/node_modules/bcrypt-pbkdf/README.md new file mode 100644 index 00000000..12018090 --- /dev/null +++ b/app/node_modules/bcrypt-pbkdf/README.md @@ -0,0 +1,39 @@ +Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified +version of [Devi Mandiri's port] +(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), +with some minor performance improvements. The code is copied verbatim (and +un-styled) from Devi's work. + +This product includes software developed by Niels Provos. + +## API + +### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` + +Derive a cryptographic key of arbitrary length from a given password and salt, +using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and +SHA-512. + +See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for +further information. + +Parameters: + + * `pass`, a Uint8Array of length `passlen` + * `passlen`, an integer Number + * `salt`, a Uint8Array of length `saltlen` + * `saltlen`, an integer Number + * `key`, a Uint8Array of length `keylen`, will be filled with output + * `keylen`, an integer Number + * `rounds`, an integer Number, number of rounds of the PBKDF to run + +### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` + +Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as +part of the inner round function in the PBKDF. + +Parameters: + + * `sha2pass`, a Uint8Array of length 64 + * `sha2salt`, a Uint8Array of length 64 + * `out`, a Uint8Array of length 32, will be filled with output diff --git a/app/node_modules/bcrypt-pbkdf/index.js b/app/node_modules/bcrypt-pbkdf/index.js new file mode 100644 index 00000000..b1b5ad4b --- /dev/null +++ b/app/node_modules/bcrypt-pbkdf/index.js @@ -0,0 +1,556 @@ +'use strict'; + +var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; diff --git a/app/node_modules/bcrypt-pbkdf/package.json b/app/node_modules/bcrypt-pbkdf/package.json new file mode 100644 index 00000000..d4999680 --- /dev/null +++ b/app/node_modules/bcrypt-pbkdf/package.json @@ -0,0 +1,41 @@ +{ + "_args": [ + [ + "bcrypt-pbkdf@1.0.1", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "bcrypt-pbkdf@1.0.1", + "_id": "bcrypt-pbkdf@1.0.1", + "_inBundle": false, + "_integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "_location": "/bcrypt-pbkdf", + "_optional": true, + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "bcrypt-pbkdf@1.0.1", + "name": "bcrypt-pbkdf", + "escapedName": "bcrypt-pbkdf", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/s2/Documents/Code/gitlit/app", + "dependencies": { + "tweetnacl": "^0.14.3" + }, + "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", + "devDependencies": {}, + "license": "BSD-3-Clause", + "main": "index.js", + "name": "bcrypt-pbkdf", + "version": "1.0.1" +} diff --git a/app/node_modules/binary/package.json b/app/node_modules/binary/package.json index 321a87a4..58e17b3e 100644 --- a/app/node_modules/binary/package.json +++ b/app/node_modules/binary/package.json @@ -1,27 +1,33 @@ { - "_from": "binary@^0.3.0", + "_args": [ + [ + "binary@0.3.0", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "binary@0.3.0", "_id": "binary@0.3.0", "_inBundle": false, "_integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", "_location": "/binary", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "binary@^0.3.0", + "raw": "binary@0.3.0", "name": "binary", "escapedName": "binary", - "rawSpec": "^0.3.0", + "rawSpec": "0.3.0", "saveSpec": null, - "fetchSpec": "^0.3.0" + "fetchSpec": "0.3.0" }, "_requiredBy": [ "/decompress-zip" ], "_resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "_shasum": "9f60553bc5ce8c3386f3b553cff47462adecaa79", - "_spec": "binary@^0.3.0", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\decompress-zip", + "_spec": "0.3.0", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -30,12 +36,10 @@ "bugs": { "url": "https://github.com/substack/node-binary/issues" }, - "bundleDependencies": false, "dependencies": { "buffers": "~0.1.1", "chainsaw": "~0.1.0" }, - "deprecated": false, "description": "Unpack multibyte binary values from buffers", "devDependencies": { "seq": "~0.2.5", @@ -44,9 +48,6 @@ "engine": { "node": ">=0.4.0" }, - "engines": { - "node": "*" - }, "homepage": "https://github.com/substack/node-binary#readme", "keywords": [ "binary", diff --git a/app/node_modules/bluebird/package.json b/app/node_modules/bluebird/package.json index f6d38eeb..f266e5e6 100644 --- a/app/node_modules/bluebird/package.json +++ b/app/node_modules/bluebird/package.json @@ -1,28 +1,34 @@ { - "_from": "bluebird@^3.5.0", + "_args": [ + [ + "bluebird@3.5.1", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "bluebird@3.5.1", "_id": "bluebird@3.5.1", "_inBundle": false, "_integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "_location": "/bluebird", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "bluebird@^3.5.0", + "raw": "bluebird@3.5.1", "name": "bluebird", "escapedName": "bluebird", - "rawSpec": "^3.5.0", + "rawSpec": "3.5.1", "saveSpec": null, - "fetchSpec": "^3.5.0" + "fetchSpec": "3.5.1" }, "_requiredBy": [ "/electron-osx-sign", "/get-package-info" ], "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "_shasum": "d9551f9de98f1fcda1e683d17ee91a0602ee2eb9", - "_spec": "bluebird@^3.5.0", - "_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\electron-osx-sign", + "_spec": "3.5.1", + "_where": "/home/s2/Documents/Code/gitlit/app", "author": { "name": "Petka Antonov", "email": "petka_antonov@hotmail.com", @@ -32,8 +38,6 @@ "bugs": { "url": "http://github.com/petkaantonov/bluebird/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Full featured Promises/A+ implementation with exceptionally good performance", "devDependencies": { "acorn": "~0.6.0", diff --git a/app/node_modules/boom/LICENSE b/app/node_modules/boom/LICENSE new file mode 100755 index 00000000..94b91cbf --- /dev/null +++ b/app/node_modules/boom/LICENSE @@ -0,0 +1,29 @@ +Copyright (c) 2012-2017, Project contributors. +Copyright (c) 2012-2014, Walmart. +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. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND 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. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors diff --git a/app/node_modules/boom/README.md b/app/node_modules/boom/README.md new file mode 100755 index 00000000..6452491b --- /dev/null +++ b/app/node_modules/boom/README.md @@ -0,0 +1,760 @@ +![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) + +HTTP-friendly error objects + +[![Build Status](https://secure.travis-ci.org/hapijs/boom.svg)](http://travis-ci.org/hapijs/boom) +[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom) + +Lead Maintainer: [Adam Bretz](https://github.com/arb) + + + +- [Boom](#boom) + - [Helper Methods](#helper-methods) + - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) + - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) + - [HTTP 4xx Errors](#http-4xx-errors) + - [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) + - [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) + - [`Boom.paymentRequired([message], [data])`](#boompaymentrequiredmessage-data) + - [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) + - [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) + - [`Boom.methodNotAllowed([message], [data], [allow])`](#boommethodnotallowedmessage-data-allow) + - [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) + - [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) + - [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) + - [`Boom.conflict([message], [data])`](#boomconflictmessage-data) + - [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) + - [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) + - [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) + - [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) + - [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) + - [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) + - [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) + - [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) + - [`Boom.teapot([message], [data])`](#boomteapotmessage-data) + - [`Boom.badData([message], [data])`](#boombaddatamessage-data) + - [`Boom.locked([message], [data])`](#boomlockedmessage-data) + - [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) + - [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) + - [`Boom.illegal([message], [data])`](#boomillegalmessage-data) + - [HTTP 5xx Errors](#http-5xx-errors) + - [`Boom.badImplementation([message], [data])` - (*alias: `internal`*)](#boombadimplementationmessage-data---alias-internal) + - [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) + - [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) + - [`Boom.serverUnavailable([message], [data])`](#boomserverunavailablemessage-data) + - [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) + - [F.A.Q.](#faq) + + + +# Boom + +**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response +object (instance of `Error`) which includes the following properties: +- `isBoom` - if `true`, indicates this is a `Boom` object instance. +- `isServer` - convenience bool indicating status code >= 500. +- `message` - the error message. +- `output` - the formatted response. Can be directly manipulated after object construction to return a custom + error response. Allowed root keys: + - `statusCode` - the HTTP status code (typically 4xx or 5xx). + - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content. + - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any + changes will be lost + if `reformat()` is called. Any content allowed and by default includes the following content: + - `statusCode` - the HTTP status code, derived from `error.output.statusCode`. + - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`. + - `message` - the error message derived from `error.message`. +- inherited `Error` properties. + +The `Boom` object also supports the following method: +- `reformat()` - rebuilds `error.output` using the other object properties. + +## Helper Methods + +### `wrap(error, [statusCode], [message])` + +Decorates an error with the **boom** properties where: +- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object. +- `statusCode` - optional HTTP status code. Defaults to `500`. +- `message` - optional message string. If the error already has a message, it adds the message as a prefix. + Defaults to no message. + +```js +var error = new Error('Unexpected input'); +Boom.wrap(error, 400); +``` + +### `create(statusCode, [message], [data])` + +Generates an `Error` object with the **boom** decorations where: +- `statusCode` - an HTTP error code number. Must be greater or equal 400. +- `message` - optional message string. +- `data` - additional error data set to `error.data` property. + +```js +var error = Boom.create(400, 'Bad request', { timestamp: Date.now() }); +``` + +## HTTP 4xx Errors + +### `Boom.badRequest([message], [data])` + +Returns a 400 Bad Request error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.badRequest('invalid query'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 400, + "error": "Bad Request", + "message": "invalid query" +} +``` + +### `Boom.unauthorized([message], [scheme], [attributes])` + +Returns a 401 Unauthorized error where: +- `message` - optional message. +- `scheme` can be one of the following: + - an authentication scheme name + - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. +- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used + when `scheme` is a string, otherwise it is ignored. Every key/value pair will be included in the + 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null. + `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as + the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header + will not be present and `isMissing` will be true on the error object. + +If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response. + +```js +Boom.unauthorized('invalid password'); +``` + +Generates the following response: + +```json +"payload": { + "statusCode": 401, + "error": "Unauthorized", + "message": "invalid password" +}, +"headers" {} +``` + +```js +Boom.unauthorized('invalid password', 'sample'); +``` + +Generates the following response: + +```json +"payload": { + "statusCode": 401, + "error": "Unauthorized", + "message": "invalid password", + "attributes": { + "error": "invalid password" + } +}, +"headers" { + "WWW-Authenticate": "sample error=\"invalid password\"" +} +``` + +```js +Boom.unauthorized(null, 'Negotiate', 'VGhpcyBpcyBhIHRlc3QgdG9rZW4='); +``` + +Generates the following response: + +```json +"payload": { + "statusCode": 401, + "error": "Unauthorized", + "attributes": "VGhpcyBpcyBhIHRlc3QgdG9rZW4=" +}, +"headers" { + "WWW-Authenticate": "Negotiate VGhpcyBpcyBhIHRlc3QgdG9rZW4=" +} +``` + +```js +Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' }); +``` + +Generates the following response: + +```json +"payload": { + "statusCode": 401, + "error": "Unauthorized", + "message": "invalid password", + "attributes": { + "error": "invalid password", + "ttl": 0, + "cache": "", + "foo": "bar" + } +}, +"headers" { + "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\"" +} +``` + +### `Boom.paymentRequired([message], [data])` + +Returns a 402 Payment Required error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.paymentRequired('bandwidth used'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 402, + "error": "Payment Required", + "message": "bandwidth used" +} +``` + +### `Boom.forbidden([message], [data])` + +Returns a 403 Forbidden error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.forbidden('try again some time'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 403, + "error": "Forbidden", + "message": "try again some time" +} +``` + +### `Boom.notFound([message], [data])` + +Returns a 404 Not Found error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.notFound('missing'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 404, + "error": "Not Found", + "message": "missing" +} +``` + +### `Boom.methodNotAllowed([message], [data], [allow])` + +Returns a 405 Method Not Allowed error where: +- `message` - optional message. +- `data` - optional additional error data. +- `allow` - optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. + +```js +Boom.methodNotAllowed('that method is not allowed'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 405, + "error": "Method Not Allowed", + "message": "that method is not allowed" +} +``` + +### `Boom.notAcceptable([message], [data])` + +Returns a 406 Not Acceptable error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.notAcceptable('unacceptable'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 406, + "error": "Not Acceptable", + "message": "unacceptable" +} +``` + +### `Boom.proxyAuthRequired([message], [data])` + +Returns a 407 Proxy Authentication Required error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.proxyAuthRequired('auth missing'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 407, + "error": "Proxy Authentication Required", + "message": "auth missing" +} +``` + +### `Boom.clientTimeout([message], [data])` + +Returns a 408 Request Time-out error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.clientTimeout('timed out'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 408, + "error": "Request Time-out", + "message": "timed out" +} +``` + +### `Boom.conflict([message], [data])` + +Returns a 409 Conflict error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.conflict('there was a conflict'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 409, + "error": "Conflict", + "message": "there was a conflict" +} +``` + +### `Boom.resourceGone([message], [data])` + +Returns a 410 Gone error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.resourceGone('it is gone'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 410, + "error": "Gone", + "message": "it is gone" +} +``` + +### `Boom.lengthRequired([message], [data])` + +Returns a 411 Length Required error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.lengthRequired('length needed'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 411, + "error": "Length Required", + "message": "length needed" +} +``` + +### `Boom.preconditionFailed([message], [data])` + +Returns a 412 Precondition Failed error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.preconditionFailed(); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 412, + "error": "Precondition Failed" +} +``` + +### `Boom.entityTooLarge([message], [data])` + +Returns a 413 Request Entity Too Large error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.entityTooLarge('too big'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 413, + "error": "Request Entity Too Large", + "message": "too big" +} +``` + +### `Boom.uriTooLong([message], [data])` + +Returns a 414 Request-URI Too Large error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.uriTooLong('uri is too long'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 414, + "error": "Request-URI Too Large", + "message": "uri is too long" +} +``` + +### `Boom.unsupportedMediaType([message], [data])` + +Returns a 415 Unsupported Media Type error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.unsupportedMediaType('that media is not supported'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 415, + "error": "Unsupported Media Type", + "message": "that media is not supported" +} +``` + +### `Boom.rangeNotSatisfiable([message], [data])` + +Returns a 416 Requested Range Not Satisfiable error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.rangeNotSatisfiable(); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 416, + "error": "Requested Range Not Satisfiable" +} +``` + +### `Boom.expectationFailed([message], [data])` + +Returns a 417 Expectation Failed error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.expectationFailed('expected this to work'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 417, + "error": "Expectation Failed", + "message": "expected this to work" +} +``` + +### `Boom.teapot([message], [data])` + +Returns a 418 I'm a Teapot error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.teapot('sorry, no coffee...'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 418, + "error": "I'm a Teapot", + "message": "Sorry, no coffee..." +} +``` + +### `Boom.badData([message], [data])` + +Returns a 422 Unprocessable Entity error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.badData('your data is bad and you should feel bad'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 422, + "error": "Unprocessable Entity", + "message": "your data is bad and you should feel bad" +} +``` + +### `Boom.locked([message], [data])` + +Returns a 423 Locked error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.locked('this resource has been locked'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 423, + "error": "Locked", + "message": "this resource has been locked" +} +``` + +### `Boom.preconditionRequired([message], [data])` + +Returns a 428 Precondition Required error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.preconditionRequired('you must supply an If-Match header'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 428, + "error": "Precondition Required", + "message": "you must supply an If-Match header" +} +``` + +### `Boom.tooManyRequests([message], [data])` + +Returns a 429 Too Many Requests error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.tooManyRequests('you have exceeded your request limit'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 429, + "error": "Too Many Requests", + "message": "you have exceeded your request limit" +} +``` + +### `Boom.illegal([message], [data])` + +Returns a 451 Unavailable For Legal Reasons error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.illegal('you are not permitted to view this resource for legal reasons'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 451, + "error": "Unavailable For Legal Reasons", + "message": "you are not permitted to view this resource for legal reasons" +} +``` + +## HTTP 5xx Errors + +All 500 errors hide your message from the end user. Your message is recorded in the server log. + +### `Boom.badImplementation([message], [data])` - (*alias: `internal`*) + +Returns a 500 Internal Server Error error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.badImplementation('terrible implementation'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 500, + "error": "Internal Server Error", + "message": "An internal server error occurred" +} +``` + +### `Boom.notImplemented([message], [data])` + +Returns a 501 Not Implemented error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.notImplemented('method not implemented'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 501, + "error": "Not Implemented", + "message": "method not implemented" +} +``` + +### `Boom.badGateway([message], [data])` + +Returns a 502 Bad Gateway error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.badGateway('that is a bad gateway'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 502, + "error": "Bad Gateway", + "message": "that is a bad gateway" +} +``` + +### `Boom.serverUnavailable([message], [data])` + +Returns a 503 Service Unavailable error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.serverUnavailable('unavailable'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 503, + "error": "Service Unavailable", + "message": "unavailable" +} +``` + +### `Boom.gatewayTimeout([message], [data])` + +Returns a 504 Gateway Time-out error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.gatewayTimeout(); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 504, + "error": "Gateway Time-out" +} +``` + +## F.A.Q. + +**Q** How do I include extra information in my responses? `output.payload` is missing `data`, what gives? + +**A** There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation. + +--- diff --git a/app/node_modules/boom/lib/index.js b/app/node_modules/boom/lib/index.js new file mode 100755 index 00000000..17ed0279 --- /dev/null +++ b/app/node_modules/boom/lib/index.js @@ -0,0 +1,433 @@ +'use strict'; + +// Load modules + +const Hoek = require('hoek'); + + +// Declare internals + +const internals = { + STATUS_CODES: Object.setPrototypeOf({ + '100': 'Continue', + '101': 'Switching Protocols', + '102': 'Processing', + '200': 'OK', + '201': 'Created', + '202': 'Accepted', + '203': 'Non-Authoritative Information', + '204': 'No Content', + '205': 'Reset Content', + '206': 'Partial Content', + '207': 'Multi-Status', + '300': 'Multiple Choices', + '301': 'Moved Permanently', + '302': 'Moved Temporarily', + '303': 'See Other', + '304': 'Not Modified', + '305': 'Use Proxy', + '307': 'Temporary Redirect', + '400': 'Bad Request', + '401': 'Unauthorized', + '402': 'Payment Required', + '403': 'Forbidden', + '404': 'Not Found', + '405': 'Method Not Allowed', + '406': 'Not Acceptable', + '407': 'Proxy Authentication Required', + '408': 'Request Time-out', + '409': 'Conflict', + '410': 'Gone', + '411': 'Length Required', + '412': 'Precondition Failed', + '413': 'Request Entity Too Large', + '414': 'Request-URI Too Large', + '415': 'Unsupported Media Type', + '416': 'Requested Range Not Satisfiable', + '417': 'Expectation Failed', + '418': 'I\'m a teapot', + '422': 'Unprocessable Entity', + '423': 'Locked', + '424': 'Failed Dependency', + '425': 'Unordered Collection', + '426': 'Upgrade Required', + '428': 'Precondition Required', + '429': 'Too Many Requests', + '431': 'Request Header Fields Too Large', + '451': 'Unavailable For Legal Reasons', + '500': 'Internal Server Error', + '501': 'Not Implemented', + '502': 'Bad Gateway', + '503': 'Service Unavailable', + '504': 'Gateway Time-out', + '505': 'HTTP Version Not Supported', + '506': 'Variant Also Negotiates', + '507': 'Insufficient Storage', + '509': 'Bandwidth Limit Exceeded', + '510': 'Not Extended', + '511': 'Network Authentication Required' + }, null) +}; + + +exports.wrap = function (error, statusCode, message) { + + Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); + Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error'); + + return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message)); +}; + + +exports.create = function (statusCode, message, data) { + + return internals.create(statusCode, message, data, exports.create); +}; + + +internals.create = function (statusCode, message, data, ctor) { + + if (message instanceof Error) { + if (data) { + message.data = data; + } + return exports.wrap(message, statusCode); + } + + const error = new Error(message ? message : undefined); // Avoids settings null message + Error.captureStackTrace(error, ctor); // Filter the stack to our external API + error.data = data || null; + internals.initialize(error, statusCode); + return error; +}; + + +internals.initialize = function (error, statusCode, message) { + + const numberCode = parseInt(statusCode, 10); + Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode); + + error.isBoom = true; + error.isServer = numberCode >= 500; + + if (!error.hasOwnProperty('data')) { + error.data = null; + } + + error.output = { + statusCode: numberCode, + payload: {}, + headers: {} + }; + + error.reformat = internals.reformat; + error.reformat(); + + if (!message && + !error.message) { + + message = error.output.payload.error; + } + + if (message) { + error.message = (message + (error.message ? ': ' + error.message : '')); + } + + return error; +}; + + +internals.reformat = function () { + + this.output.payload.statusCode = this.output.statusCode; + this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown'; + + if (this.output.statusCode === 500) { + this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user + } + else if (this.message) { + this.output.payload.message = this.message; + } +}; + + +// 4xx Client Errors + +exports.badRequest = function (message, data) { + + return internals.create(400, message, data, exports.badRequest); +}; + + +exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) + + const err = internals.create(401, message, undefined, exports.unauthorized); + + if (!scheme) { + return err; + } + + let wwwAuthenticate = ''; + + if (typeof scheme === 'string') { + + // function (message, scheme, attributes) + + wwwAuthenticate = scheme; + + if (attributes || message) { + err.output.payload.attributes = {}; + } + + if (attributes) { + if (typeof attributes === 'string') { + wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes); + err.output.payload.attributes = attributes; + } + else { + const names = Object.keys(attributes); + for (let i = 0; i < names.length; ++i) { + const name = names[i]; + if (i) { + wwwAuthenticate = wwwAuthenticate + ','; + } + + let value = attributes[name]; + if (value === null || + value === undefined) { // Value can be zero + + value = ''; + } + wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; + err.output.payload.attributes[name] = value; + } + } + } + + + if (message) { + if (attributes) { + wwwAuthenticate = wwwAuthenticate + ','; + } + wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; + err.output.payload.attributes.error = message; + } + else { + err.isMissing = true; + } + } + else { + + // function (message, wwwAuthenticate[]) + + const wwwArray = scheme; + for (let i = 0; i < wwwArray.length; ++i) { + if (i) { + wwwAuthenticate = wwwAuthenticate + ', '; + } + + wwwAuthenticate = wwwAuthenticate + wwwArray[i]; + } + } + + err.output.headers['WWW-Authenticate'] = wwwAuthenticate; + + return err; +}; + + +exports.paymentRequired = function (message, data) { + + return internals.create(402, message, data, exports.paymentRequired); +}; + + +exports.forbidden = function (message, data) { + + return internals.create(403, message, data, exports.forbidden); +}; + + +exports.notFound = function (message, data) { + + return internals.create(404, message, data, exports.notFound); +}; + + +exports.methodNotAllowed = function (message, data, allow) { + + const err = internals.create(405, message, data, exports.methodNotAllowed); + + if (typeof allow === 'string') { + allow = [allow]; + } + + if (Array.isArray(allow)) { + err.output.headers.Allow = allow.join(', '); + } + + return err; +}; + + +exports.notAcceptable = function (message, data) { + + return internals.create(406, message, data, exports.notAcceptable); +}; + + +exports.proxyAuthRequired = function (message, data) { + + return internals.create(407, message, data, exports.proxyAuthRequired); +}; + + +exports.clientTimeout = function (message, data) { + + return internals.create(408, message, data, exports.clientTimeout); +}; + + +exports.conflict = function (message, data) { + + return internals.create(409, message, data, exports.conflict); +}; + + +exports.resourceGone = function (message, data) { + + return internals.create(410, message, data, exports.resourceGone); +}; + + +exports.lengthRequired = function (message, data) { + + return internals.create(411, message, data, exports.lengthRequired); +}; + + +exports.preconditionFailed = function (message, data) { + + return internals.create(412, message, data, exports.preconditionFailed); +}; + + +exports.entityTooLarge = function (message, data) { + + return internals.create(413, message, data, exports.entityTooLarge); +}; + + +exports.uriTooLong = function (message, data) { + + return internals.create(414, message, data, exports.uriTooLong); +}; + + +exports.unsupportedMediaType = function (message, data) { + + return internals.create(415, message, data, exports.unsupportedMediaType); +}; + + +exports.rangeNotSatisfiable = function (message, data) { + + return internals.create(416, message, data, exports.rangeNotSatisfiable); +}; + + +exports.expectationFailed = function (message, data) { + + return internals.create(417, message, data, exports.expectationFailed); +}; + + +exports.teapot = function (message, data) { + + return internals.create(418, message, data, exports.teapot); +}; + + +exports.badData = function (message, data) { + + return internals.create(422, message, data, exports.badData); +}; + + +exports.locked = function (message, data) { + + return internals.create(423, message, data, exports.locked); +}; + + +exports.preconditionRequired = function (message, data) { + + return internals.create(428, message, data, exports.preconditionRequired); +}; + + +exports.tooManyRequests = function (message, data) { + + return internals.create(429, message, data, exports.tooManyRequests); +}; + + +exports.illegal = function (message, data) { + + return internals.create(451, message, data, exports.illegal); +}; + + +// 5xx Server Errors + +exports.internal = function (message, data, statusCode) { + + return internals.serverError(message, data, statusCode, exports.internal); +}; + + +internals.serverError = function (message, data, statusCode, ctor) { + + let error; + if (data instanceof Error) { + error = exports.wrap(data, statusCode, message); + } + else { + error = internals.create(statusCode || 500, message, undefined, ctor); + error.data = data; + } + + return error; +}; + + +exports.notImplemented = function (message, data) { + + return internals.serverError(message, data, 501, exports.notImplemented); +}; + + +exports.badGateway = function (message, data) { + + return internals.serverError(message, data, 502, exports.badGateway); +}; + + +exports.serverUnavailable = function (message, data) { + + return internals.serverError(message, data, 503, exports.serverUnavailable); +}; + + +exports.gatewayTimeout = function (message, data) { + + return internals.serverError(message, data, 504, exports.gatewayTimeout); +}; + + +exports.badImplementation = function (message, data) { + + const err = internals.serverError(message, data, 500, exports.badImplementation); + err.isDeveloperError = true; + return err; +}; diff --git a/app/node_modules/boom/package.json b/app/node_modules/boom/package.json new file mode 100644 index 00000000..6bf7435e --- /dev/null +++ b/app/node_modules/boom/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "boom@4.3.1", + "/home/s2/Documents/Code/gitlit/app" + ] + ], + "_development": true, + "_from": "boom@4.3.1", + "_id": "boom@4.3.1", + "_inBundle": false, + "_integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "_location": "/boom", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "boom@4.3.1", + "name": "boom", + "escapedName": "boom", + "rawSpec": "4.3.1", + "saveSpec": null, + "fetchSpec": "4.3.1" + }, + "_requiredBy": [ + "/hawk" + ], + "_resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "_spec": "4.3.1", + "_where": "/home/s2/Documents/Code/gitlit/app", + "bugs": { + "url": "https://github.com/hapijs/boom/issues" + }, + "dependencies": { + "hoek": "4.x.x" + }, + "description": "HTTP-friendly error objects", + "devDependencies": { + "code": "4.x.x", + "lab": "13.x.x", + "markdown-toc": "0.12.x" + }, + "engines": { + "node": ">=4.0.0" + }, + "homepage": "https://github.com/hapijs/boom#readme", + "keywords": [ + "error", + "http" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "name": "boom", + "repository": { + "type": "git", + "url": "git://github.com/hapijs/boom.git" + }, + "scripts": { + "test": "lab -a code -t 100 -L -v", + "test-cov-html": "lab -a code -r html -o coverage.html -L", + "toc": "node generate-toc.js", + "version": "npm run toc && git add README.md" + }, + "version": "4.3.1" +} diff --git a/app/node_modules/bootstrap/LICENSE b/app/node_modules/bootstrap/LICENSE new file mode 100644 index 00000000..86f4b8ca --- /dev/null +++ b/app/node_modules/bootstrap/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011-2018 Twitter, Inc. +Copyright (c) 2011-2018 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/app/node_modules/bootstrap/README.md b/app/node_modules/bootstrap/README.md new file mode 100644 index 00000000..4a85ab00 --- /dev/null +++ b/app/node_modules/bootstrap/README.md @@ -0,0 +1,171 @@ +

Bootstrap

+ +

+ Sleek, intuitive, and powerful front-end framework for faster and easier web development. +
+ Explore Bootstrap docs » +
+
+ Report bug + · + Request feature + · + Themes + · + Jobs + · + Blog +

+

+ +
+ +## Table of contents + +- [Quick start](#quick-start) +- [Status](#status) +- [What's included](#whats-included) +- [Bugs and feature requests](#bugs-and-feature-requests) +- [Documentation](#documentation) +- [Contributing](#contributing) +- [Community](#community) +- [Versioning](#versioning) +- [Creators](#creators) +- [Copyright and license](#copyright-and-license) + +## Quick start + +Several quick start options are available: + +- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.1.1.zip) +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` +- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` +- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.1.1` +- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.1.1` +- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` + +Read the [Getting started page](https://getbootstrap.com/docs/4.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. + +## Status + +[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) +[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap) +[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap) +[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap) +[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap) +[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap) +[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/absoluteLatest) +[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=peer) +[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev) +[![CSS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css) +[![JS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js) + +[![Sauce Labs Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) + +## What's included + +Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this: + +``` +bootstrap/ +├── css/ +│ ├── bootstrap.css +│ ├── bootstrap.css.map +│ ├── bootstrap.min.css +│ ├── bootstrap.min.css.map +│ ├── bootstrap-grid.css +│ ├── bootstrap-grid.css.map +│ ├── bootstrap-grid.min.css +│ ├── bootstrap-grid.min.css.map +│ ├── bootstrap-reboot.css +│ ├── bootstrap-reboot.css.map +│ ├── bootstrap-reboot.min.css +│ └── bootstrap-reboot.min.css.map +└── js/ + ├── bootstrap.bundle.js + ├── bootstrap.bundle.min.js + ├── bootstrap.js + └── bootstrap.min.js +``` + +We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/web/tools/chrome-devtools/debug/readability/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/). + + +## Bugs and feature requests + +Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). + + +## Documentation + +Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at . The docs may also be run locally. + +Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `assets/js/src/search.js` file. + +### Running documentation locally + +1. Run through the [tooling setup](https://getbootstrap.com/docs/4.0/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`. +2. Run `npm install` to install Node.js dependencies. +3. Run `npm run test` (or a specific NPM script) to rebuild distributed CSS and JavaScript files, as well as our docs assets. +4. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line. +5. Open `http://localhost:9001` in your browser, and voilà. + +Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/). + +### Documentation for previous releases + +- For v2.3.2: +- For v3.3.x: + +[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. + + +## Contributing + +Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. + +Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo). + +Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at . + + +## Community + +Get updates on Bootstrap's development and chat with the project maintainers and community members. + +- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). +- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). +- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). +- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. +- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)). +- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. + + +## Versioning + +For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible. + +See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release. + + +## Creators + +**Mark Otto** + +- +- + +**Jacob Thornton** + +- +- + + +## Copyright and license + +Code and documentation copyright 2011-2018 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE). diff --git a/app/node_modules/bootstrap/js/src/alert.js b/app/node_modules/bootstrap/js/src/alert.js new file mode 100644 index 00000000..36d4bb69 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/alert.js @@ -0,0 +1,183 @@ +import $ from 'jquery' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Alert = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'alert' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.alert' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Selector = { + DISMISS : '[data-dismiss="alert"]' + } + + const Event = { + CLOSE : `close${EVENT_KEY}`, + CLOSED : `closed${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + ALERT : 'alert', + FADE : 'fade', + SHOW : 'show' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Alert { + constructor(element) { + this._element = element + } + + // Getters + + static get VERSION() { + return VERSION + } + + // Public + + close(element) { + let rootElement = this._element + if (element) { + rootElement = this._getRootElement(element) + } + + const customEvent = this._triggerCloseEvent(rootElement) + + if (customEvent.isDefaultPrevented()) { + return + } + + this._removeElement(rootElement) + } + + dispose() { + $.removeData(this._element, DATA_KEY) + this._element = null + } + + // Private + + _getRootElement(element) { + const selector = Util.getSelectorFromElement(element) + let parent = false + + if (selector) { + parent = $(selector)[0] + } + + if (!parent) { + parent = $(element).closest(`.${ClassName.ALERT}`)[0] + } + + return parent + } + + _triggerCloseEvent(element) { + const closeEvent = $.Event(Event.CLOSE) + + $(element).trigger(closeEvent) + return closeEvent + } + + _removeElement(element) { + $(element).removeClass(ClassName.SHOW) + + if (!$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element) + return + } + + const transitionDuration = Util.getTransitionDurationFromElement(element) + + $(element) + .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event)) + .emulateTransitionEnd(transitionDuration) + } + + _destroyElement(element) { + $(element) + .detach() + .trigger(Event.CLOSED) + .remove() + } + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + const $element = $(this) + let data = $element.data(DATA_KEY) + + if (!data) { + data = new Alert(this) + $element.data(DATA_KEY, data) + } + + if (config === 'close') { + data[config](this) + } + }) + } + + static _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault() + } + + alertInstance.close(this) + } + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on( + Event.CLICK_DATA_API, + Selector.DISMISS, + Alert._handleDismiss(new Alert()) + ) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface + $.fn[NAME].Constructor = Alert + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Alert._jQueryInterface + } + + return Alert +})($) + +export default Alert diff --git a/app/node_modules/bootstrap/js/src/button.js b/app/node_modules/bootstrap/js/src/button.js new file mode 100644 index 00000000..1065ae6d --- /dev/null +++ b/app/node_modules/bootstrap/js/src/button.js @@ -0,0 +1,175 @@ +import $ from 'jquery' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Button = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'button' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.button' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const ClassName = { + ACTIVE : 'active', + BUTTON : 'btn', + FOCUS : 'focus' + } + + const Selector = { + DATA_TOGGLE_CARROT : '[data-toggle^="button"]', + DATA_TOGGLE : '[data-toggle="buttons"]', + INPUT : 'input', + ACTIVE : '.active', + BUTTON : '.btn' + } + + const Event = { + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, + FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` + + `blur${EVENT_KEY}${DATA_API_KEY}` + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Button { + constructor(element) { + this._element = element + } + + // Getters + + static get VERSION() { + return VERSION + } + + // Public + + toggle() { + let triggerChangeEvent = true + let addAriaPressed = true + const rootElement = $(this._element).closest( + Selector.DATA_TOGGLE + )[0] + + if (rootElement) { + const input = $(this._element).find(Selector.INPUT)[0] + + if (input) { + if (input.type === 'radio') { + if (input.checked && + $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false + } else { + const activeElement = $(rootElement).find(Selector.ACTIVE)[0] + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE) + } + } + } + + if (triggerChangeEvent) { + if (input.hasAttribute('disabled') || + rootElement.hasAttribute('disabled') || + input.classList.contains('disabled') || + rootElement.classList.contains('disabled')) { + return + } + input.checked = !$(this._element).hasClass(ClassName.ACTIVE) + $(input).trigger('change') + } + + input.focus() + addAriaPressed = false + } + } + + if (addAriaPressed) { + this._element.setAttribute('aria-pressed', + !$(this._element).hasClass(ClassName.ACTIVE)) + } + + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE) + } + } + + dispose() { + $.removeData(this._element, DATA_KEY) + this._element = null + } + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + + if (!data) { + data = new Button(this) + $(this).data(DATA_KEY, data) + } + + if (config === 'toggle') { + data[config]() + } + }) + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => { + event.preventDefault() + + let button = event.target + + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON) + } + + Button._jQueryInterface.call($(button), 'toggle') + }) + .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => { + const button = $(event.target).closest(Selector.BUTTON)[0] + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)) + }) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface + $.fn[NAME].Constructor = Button + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Button._jQueryInterface + } + + return Button +})($) + +export default Button diff --git a/app/node_modules/bootstrap/js/src/carousel.js b/app/node_modules/bootstrap/js/src/carousel.js new file mode 100644 index 00000000..d15b5e89 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/carousel.js @@ -0,0 +1,517 @@ +import $ from 'jquery' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Carousel = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'carousel' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.carousel' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key + const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key + const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch + + const Default = { + interval : 5000, + keyboard : true, + slide : false, + pause : 'hover', + wrap : true + } + + const DefaultType = { + interval : '(number|boolean)', + keyboard : 'boolean', + slide : '(boolean|string)', + pause : '(string|boolean)', + wrap : 'boolean' + } + + const Direction = { + NEXT : 'next', + PREV : 'prev', + LEFT : 'left', + RIGHT : 'right' + } + + const Event = { + SLIDE : `slide${EVENT_KEY}`, + SLID : `slid${EVENT_KEY}`, + KEYDOWN : `keydown${EVENT_KEY}`, + MOUSEENTER : `mouseenter${EVENT_KEY}`, + MOUSELEAVE : `mouseleave${EVENT_KEY}`, + TOUCHEND : `touchend${EVENT_KEY}`, + LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + CAROUSEL : 'carousel', + ACTIVE : 'active', + SLIDE : 'slide', + RIGHT : 'carousel-item-right', + LEFT : 'carousel-item-left', + NEXT : 'carousel-item-next', + PREV : 'carousel-item-prev', + ITEM : 'carousel-item' + } + + const Selector = { + ACTIVE : '.active', + ACTIVE_ITEM : '.active.carousel-item', + ITEM : '.carousel-item', + NEXT_PREV : '.carousel-item-next, .carousel-item-prev', + INDICATORS : '.carousel-indicators', + DATA_SLIDE : '[data-slide], [data-slide-to]', + DATA_RIDE : '[data-ride="carousel"]' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Carousel { + constructor(element, config) { + this._items = null + this._interval = null + this._activeElement = null + + this._isPaused = false + this._isSliding = false + + this.touchTimeout = null + + this._config = this._getConfig(config) + this._element = $(element)[0] + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0] + + this._addEventListeners() + } + + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + // Public + + next() { + if (!this._isSliding) { + this._slide(Direction.NEXT) + } + } + + nextWhenVisible() { + // Don't call next when the page isn't visible + // or the carousel or its parent isn't visible + if (!document.hidden && + ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) { + this.next() + } + } + + prev() { + if (!this._isSliding) { + this._slide(Direction.PREV) + } + } + + pause(event) { + if (!event) { + this._isPaused = true + } + + if ($(this._element).find(Selector.NEXT_PREV)[0]) { + Util.triggerTransitionEnd(this._element) + this.cycle(true) + } + + clearInterval(this._interval) + this._interval = null + } + + cycle(event) { + if (!event) { + this._isPaused = false + } + + if (this._interval) { + clearInterval(this._interval) + this._interval = null + } + + if (this._config.interval && !this._isPaused) { + this._interval = setInterval( + (document.visibilityState ? this.nextWhenVisible : this.next).bind(this), + this._config.interval + ) + } + } + + to(index) { + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0] + + const activeIndex = this._getItemIndex(this._activeElement) + + if (index > this._items.length - 1 || index < 0) { + return + } + + if (this._isSliding) { + $(this._element).one(Event.SLID, () => this.to(index)) + return + } + + if (activeIndex === index) { + this.pause() + this.cycle() + return + } + + const direction = index > activeIndex + ? Direction.NEXT + : Direction.PREV + + this._slide(direction, this._items[index]) + } + + dispose() { + $(this._element).off(EVENT_KEY) + $.removeData(this._element, DATA_KEY) + + this._items = null + this._config = null + this._element = null + this._interval = null + this._isPaused = null + this._isSliding = null + this._activeElement = null + this._indicatorsElement = null + } + + // Private + + _getConfig(config) { + config = { + ...Default, + ...config + } + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _addEventListeners() { + if (this._config.keyboard) { + $(this._element) + .on(Event.KEYDOWN, (event) => this._keydown(event)) + } + + if (this._config.pause === 'hover') { + $(this._element) + .on(Event.MOUSEENTER, (event) => this.pause(event)) + .on(Event.MOUSELEAVE, (event) => this.cycle(event)) + if ('ontouchstart' in document.documentElement) { + // If it's a touch-enabled device, mouseenter/leave are fired as + // part of the mouse compatibility events on first tap - the carousel + // would stop cycling until user tapped out of it; + // here, we listen for touchend, explicitly pause the carousel + // (as if it's the second time we tap on it, mouseenter compat event + // is NOT fired) and after a timeout (to allow for mouse compatibility + // events to fire) we explicitly restart cycling + $(this._element).on(Event.TOUCHEND, () => { + this.pause() + if (this.touchTimeout) { + clearTimeout(this.touchTimeout) + } + this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval) + }) + } + } + } + + _keydown(event) { + if (/input|textarea/i.test(event.target.tagName)) { + return + } + + switch (event.which) { + case ARROW_LEFT_KEYCODE: + event.preventDefault() + this.prev() + break + case ARROW_RIGHT_KEYCODE: + event.preventDefault() + this.next() + break + default: + } + } + + _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)) + return this._items.indexOf(element) + } + + _getItemByDirection(direction, activeElement) { + const isNextDirection = direction === Direction.NEXT + const isPrevDirection = direction === Direction.PREV + const activeIndex = this._getItemIndex(activeElement) + const lastItemIndex = this._items.length - 1 + const isGoingToWrap = isPrevDirection && activeIndex === 0 || + isNextDirection && activeIndex === lastItemIndex + + if (isGoingToWrap && !this._config.wrap) { + return activeElement + } + + const delta = direction === Direction.PREV ? -1 : 1 + const itemIndex = (activeIndex + delta) % this._items.length + + return itemIndex === -1 + ? this._items[this._items.length - 1] : this._items[itemIndex] + } + + _triggerSlideEvent(relatedTarget, eventDirectionName) { + const targetIndex = this._getItemIndex(relatedTarget) + const fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]) + const slideEvent = $.Event(Event.SLIDE, { + relatedTarget, + direction: eventDirectionName, + from: fromIndex, + to: targetIndex + }) + + $(this._element).trigger(slideEvent) + + return slideEvent + } + + _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement) + .find(Selector.ACTIVE) + .removeClass(ClassName.ACTIVE) + + const nextIndicator = this._indicatorsElement.children[ + this._getItemIndex(element) + ] + + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE) + } + } + } + + _slide(direction, element) { + const activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0] + const activeElementIndex = this._getItemIndex(activeElement) + const nextElement = element || activeElement && + this._getItemByDirection(direction, activeElement) + const nextElementIndex = this._getItemIndex(nextElement) + const isCycling = Boolean(this._interval) + + let directionalClassName + let orderClassName + let eventDirectionName + + if (direction === Direction.NEXT) { + directionalClassName = ClassName.LEFT + orderClassName = ClassName.NEXT + eventDirectionName = Direction.LEFT + } else { + directionalClassName = ClassName.RIGHT + orderClassName = ClassName.PREV + eventDirectionName = Direction.RIGHT + } + + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false + return + } + + const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName) + if (slideEvent.isDefaultPrevented()) { + return + } + + if (!activeElement || !nextElement) { + // Some weirdness is happening, so we bail + return + } + + this._isSliding = true + + if (isCycling) { + this.pause() + } + + this._setActiveIndicatorElement(nextElement) + + const slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: eventDirectionName, + from: activeElementIndex, + to: nextElementIndex + }) + + if ($(this._element).hasClass(ClassName.SLIDE)) { + $(nextElement).addClass(orderClassName) + + Util.reflow(nextElement) + + $(activeElement).addClass(directionalClassName) + $(nextElement).addClass(directionalClassName) + + const transitionDuration = Util.getTransitionDurationFromElement(activeElement) + + $(activeElement) + .one(Util.TRANSITION_END, () => { + $(nextElement) + .removeClass(`${directionalClassName} ${orderClassName}`) + .addClass(ClassName.ACTIVE) + + $(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`) + + this._isSliding = false + + setTimeout(() => $(this._element).trigger(slidEvent), 0) + }) + .emulateTransitionEnd(transitionDuration) + } else { + $(activeElement).removeClass(ClassName.ACTIVE) + $(nextElement).addClass(ClassName.ACTIVE) + + this._isSliding = false + $(this._element).trigger(slidEvent) + } + + if (isCycling) { + this.cycle() + } + } + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = { + ...Default, + ...$(this).data() + } + + if (typeof config === 'object') { + _config = { + ..._config, + ...config + } + } + + const action = typeof config === 'string' ? config : _config.slide + + if (!data) { + data = new Carousel(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'number') { + data.to(config) + } else if (typeof action === 'string') { + if (typeof data[action] === 'undefined') { + throw new TypeError(`No method named "${action}"`) + } + data[action]() + } else if (_config.interval) { + data.pause() + data.cycle() + } + }) + } + + static _dataApiClickHandler(event) { + const selector = Util.getSelectorFromElement(this) + + if (!selector) { + return + } + + const target = $(selector)[0] + + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return + } + + const config = { + ...$(target).data(), + ...$(this).data() + } + const slideIndex = this.getAttribute('data-slide-to') + + if (slideIndex) { + config.interval = false + } + + Carousel._jQueryInterface.call($(target), config) + + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex) + } + + event.preventDefault() + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler) + + $(window).on(Event.LOAD_DATA_API, () => { + $(Selector.DATA_RIDE).each(function () { + const $carousel = $(this) + Carousel._jQueryInterface.call($carousel, $carousel.data()) + }) + }) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface + $.fn[NAME].Constructor = Carousel + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Carousel._jQueryInterface + } + + return Carousel +})($) + +export default Carousel diff --git a/app/node_modules/bootstrap/js/src/collapse.js b/app/node_modules/bootstrap/js/src/collapse.js new file mode 100644 index 00000000..a7565422 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/collapse.js @@ -0,0 +1,394 @@ +import $ from 'jquery' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Collapse = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'collapse' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.collapse' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Default = { + toggle : true, + parent : '' + } + + const DefaultType = { + toggle : 'boolean', + parent : '(string|element)' + } + + const Event = { + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + SHOW : 'show', + COLLAPSE : 'collapse', + COLLAPSING : 'collapsing', + COLLAPSED : 'collapsed' + } + + const Dimension = { + WIDTH : 'width', + HEIGHT : 'height' + } + + const Selector = { + ACTIVES : '.show, .collapsing', + DATA_TOGGLE : '[data-toggle="collapse"]' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Collapse { + constructor(element, config) { + this._isTransitioning = false + this._element = element + this._config = this._getConfig(config) + this._triggerArray = $.makeArray($( + `[data-toggle="collapse"][href="#${element.id}"],` + + `[data-toggle="collapse"][data-target="#${element.id}"]` + )) + const tabToggles = $(Selector.DATA_TOGGLE) + for (let i = 0; i < tabToggles.length; i++) { + const elem = tabToggles[i] + const selector = Util.getSelectorFromElement(elem) + if (selector !== null && $(selector).filter(element).length > 0) { + this._selector = selector + this._triggerArray.push(elem) + } + } + + this._parent = this._config.parent ? this._getParent() : null + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray) + } + + if (this._config.toggle) { + this.toggle() + } + } + + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + // Public + + toggle() { + if ($(this._element).hasClass(ClassName.SHOW)) { + this.hide() + } else { + this.show() + } + } + + show() { + if (this._isTransitioning || + $(this._element).hasClass(ClassName.SHOW)) { + return + } + + let actives + let activesData + + if (this._parent) { + actives = $.makeArray( + $(this._parent) + .find(Selector.ACTIVES) + .filter(`[data-parent="${this._config.parent}"]`) + ) + if (actives.length === 0) { + actives = null + } + } + + if (actives) { + activesData = $(actives).not(this._selector).data(DATA_KEY) + if (activesData && activesData._isTransitioning) { + return + } + } + + const startEvent = $.Event(Event.SHOW) + $(this._element).trigger(startEvent) + if (startEvent.isDefaultPrevented()) { + return + } + + if (actives) { + Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide') + if (!activesData) { + $(actives).data(DATA_KEY, null) + } + } + + const dimension = this._getDimension() + + $(this._element) + .removeClass(ClassName.COLLAPSE) + .addClass(ClassName.COLLAPSING) + + this._element.style[dimension] = 0 + + if (this._triggerArray.length > 0) { + $(this._triggerArray) + .removeClass(ClassName.COLLAPSED) + .attr('aria-expanded', true) + } + + this.setTransitioning(true) + + const complete = () => { + $(this._element) + .removeClass(ClassName.COLLAPSING) + .addClass(ClassName.COLLAPSE) + .addClass(ClassName.SHOW) + + this._element.style[dimension] = '' + + this.setTransitioning(false) + + $(this._element).trigger(Event.SHOWN) + } + + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1) + const scrollSize = `scroll${capitalizedDimension}` + const transitionDuration = Util.getTransitionDurationFromElement(this._element) + + $(this._element) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(transitionDuration) + + this._element.style[dimension] = `${this._element[scrollSize]}px` + } + + hide() { + if (this._isTransitioning || + !$(this._element).hasClass(ClassName.SHOW)) { + return + } + + const startEvent = $.Event(Event.HIDE) + $(this._element).trigger(startEvent) + if (startEvent.isDefaultPrevented()) { + return + } + + const dimension = this._getDimension() + + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px` + + Util.reflow(this._element) + + $(this._element) + .addClass(ClassName.COLLAPSING) + .removeClass(ClassName.COLLAPSE) + .removeClass(ClassName.SHOW) + + if (this._triggerArray.length > 0) { + for (let i = 0; i < this._triggerArray.length; i++) { + const trigger = this._triggerArray[i] + const selector = Util.getSelectorFromElement(trigger) + if (selector !== null) { + const $elem = $(selector) + if (!$elem.hasClass(ClassName.SHOW)) { + $(trigger).addClass(ClassName.COLLAPSED) + .attr('aria-expanded', false) + } + } + } + } + + this.setTransitioning(true) + + const complete = () => { + this.setTransitioning(false) + $(this._element) + .removeClass(ClassName.COLLAPSING) + .addClass(ClassName.COLLAPSE) + .trigger(Event.HIDDEN) + } + + this._element.style[dimension] = '' + const transitionDuration = Util.getTransitionDurationFromElement(this._element) + + $(this._element) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(transitionDuration) + } + + setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning + } + + dispose() { + $.removeData(this._element, DATA_KEY) + + this._config = null + this._parent = null + this._element = null + this._triggerArray = null + this._isTransitioning = null + } + + // Private + + _getConfig(config) { + config = { + ...Default, + ...config + } + config.toggle = Boolean(config.toggle) // Coerce string values + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _getDimension() { + const hasWidth = $(this._element).hasClass(Dimension.WIDTH) + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT + } + + _getParent() { + let parent = null + if (Util.isElement(this._config.parent)) { + parent = this._config.parent + + // It's a jQuery object + if (typeof this._config.parent.jquery !== 'undefined') { + parent = this._config.parent[0] + } + } else { + parent = $(this._config.parent)[0] + } + + const selector = + `[data-toggle="collapse"][data-parent="${this._config.parent}"]` + + $(parent).find(selector).each((i, element) => { + this._addAriaAndCollapsedClass( + Collapse._getTargetFromElement(element), + [element] + ) + }) + + return parent + } + + _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + const isOpen = $(element).hasClass(ClassName.SHOW) + + if (triggerArray.length > 0) { + $(triggerArray) + .toggleClass(ClassName.COLLAPSED, !isOpen) + .attr('aria-expanded', isOpen) + } + } + } + + // Static + + static _getTargetFromElement(element) { + const selector = Util.getSelectorFromElement(element) + return selector ? $(selector)[0] : null + } + + static _jQueryInterface(config) { + return this.each(function () { + const $this = $(this) + let data = $this.data(DATA_KEY) + const _config = { + ...Default, + ...$this.data(), + ...typeof config === 'object' && config ? config : {} + } + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false + } + + if (!data) { + data = new Collapse(this, _config) + $this.data(DATA_KEY, data) + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + data[config]() + } + }) + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + // preventDefault only for elements (which change the URL) not inside the collapsible element + if (event.currentTarget.tagName === 'A') { + event.preventDefault() + } + + const $trigger = $(this) + const selector = Util.getSelectorFromElement(this) + $(selector).each(function () { + const $target = $(this) + const data = $target.data(DATA_KEY) + const config = data ? 'toggle' : $trigger.data() + Collapse._jQueryInterface.call($target, config) + }) + }) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Collapse._jQueryInterface + $.fn[NAME].Constructor = Collapse + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Collapse._jQueryInterface + } + + return Collapse +})($) + +export default Collapse diff --git a/app/node_modules/bootstrap/js/src/dropdown.js b/app/node_modules/bootstrap/js/src/dropdown.js new file mode 100644 index 00000000..7e7dff07 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/dropdown.js @@ -0,0 +1,487 @@ +import $ from 'jquery' +import Popper from 'popper.js' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Dropdown = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'dropdown' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.dropdown' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key + const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key + const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key + const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key + const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key + const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse) + const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`) + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + CLICK : `click${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, + KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`, + KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + DISABLED : 'disabled', + SHOW : 'show', + DROPUP : 'dropup', + DROPRIGHT : 'dropright', + DROPLEFT : 'dropleft', + MENURIGHT : 'dropdown-menu-right', + MENULEFT : 'dropdown-menu-left', + POSITION_STATIC : 'position-static' + } + + const Selector = { + DATA_TOGGLE : '[data-toggle="dropdown"]', + FORM_CHILD : '.dropdown form', + MENU : '.dropdown-menu', + NAVBAR_NAV : '.navbar-nav', + VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' + } + + const AttachmentMap = { + TOP : 'top-start', + TOPEND : 'top-end', + BOTTOM : 'bottom-start', + BOTTOMEND : 'bottom-end', + RIGHT : 'right-start', + RIGHTEND : 'right-end', + LEFT : 'left-start', + LEFTEND : 'left-end' + } + + const Default = { + offset : 0, + flip : true, + boundary : 'scrollParent', + reference : 'toggle', + display : 'dynamic' + } + + const DefaultType = { + offset : '(number|string|function)', + flip : 'boolean', + boundary : '(string|element)', + reference : '(string|element)', + display : 'string' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Dropdown { + constructor(element, config) { + this._element = element + this._popper = null + this._config = this._getConfig(config) + this._menu = this._getMenuElement() + this._inNavbar = this._detectNavbar() + + this._addEventListeners() + } + + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + // Public + + toggle() { + if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) { + return + } + + const parent = Dropdown._getParentFromElement(this._element) + const isActive = $(this._menu).hasClass(ClassName.SHOW) + + Dropdown._clearMenus() + + if (isActive) { + return + } + + const relatedTarget = { + relatedTarget: this._element + } + const showEvent = $.Event(Event.SHOW, relatedTarget) + + $(parent).trigger(showEvent) + + if (showEvent.isDefaultPrevented()) { + return + } + + // Disable totally Popper.js for Dropdown in Navbar + if (!this._inNavbar) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)') + } + + let referenceElement = this._element + + if (this._config.reference === 'parent') { + referenceElement = parent + } else if (Util.isElement(this._config.reference)) { + referenceElement = this._config.reference + + // Check if it's jQuery element + if (typeof this._config.reference.jquery !== 'undefined') { + referenceElement = this._config.reference[0] + } + } + + // If boundary is not `scrollParent`, then set position to `static` + // to allow the menu to "escape" the scroll parent's boundaries + // https://github.com/twbs/bootstrap/issues/24251 + if (this._config.boundary !== 'scrollParent') { + $(parent).addClass(ClassName.POSITION_STATIC) + } + this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()) + } + + // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + if ('ontouchstart' in document.documentElement && + $(parent).closest(Selector.NAVBAR_NAV).length === 0) { + $(document.body).children().on('mouseover', null, $.noop) + } + + this._element.focus() + this._element.setAttribute('aria-expanded', true) + + $(this._menu).toggleClass(ClassName.SHOW) + $(parent) + .toggleClass(ClassName.SHOW) + .trigger($.Event(Event.SHOWN, relatedTarget)) + } + + dispose() { + $.removeData(this._element, DATA_KEY) + $(this._element).off(EVENT_KEY) + this._element = null + this._menu = null + if (this._popper !== null) { + this._popper.destroy() + this._popper = null + } + } + + update() { + this._inNavbar = this._detectNavbar() + if (this._popper !== null) { + this._popper.scheduleUpdate() + } + } + + // Private + + _addEventListeners() { + $(this._element).on(Event.CLICK, (event) => { + event.preventDefault() + event.stopPropagation() + this.toggle() + }) + } + + _getConfig(config) { + config = { + ...this.constructor.Default, + ...$(this._element).data(), + ...config + } + + Util.typeCheckConfig( + NAME, + config, + this.constructor.DefaultType + ) + + return config + } + + _getMenuElement() { + if (!this._menu) { + const parent = Dropdown._getParentFromElement(this._element) + this._menu = $(parent).find(Selector.MENU)[0] + } + return this._menu + } + + _getPlacement() { + const $parentDropdown = $(this._element).parent() + let placement = AttachmentMap.BOTTOM + + // Handle dropup + if ($parentDropdown.hasClass(ClassName.DROPUP)) { + placement = AttachmentMap.TOP + if ($(this._menu).hasClass(ClassName.MENURIGHT)) { + placement = AttachmentMap.TOPEND + } + } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { + placement = AttachmentMap.RIGHT + } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { + placement = AttachmentMap.LEFT + } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { + placement = AttachmentMap.BOTTOMEND + } + return placement + } + + _detectNavbar() { + return $(this._element).closest('.navbar').length > 0 + } + + _getPopperConfig() { + const offsetConf = {} + if (typeof this._config.offset === 'function') { + offsetConf.fn = (data) => { + data.offsets = { + ...data.offsets, + ...this._config.offset(data.offsets) || {} + } + return data + } + } else { + offsetConf.offset = this._config.offset + } + const popperConfig = { + placement: this._getPlacement(), + modifiers: { + offset: offsetConf, + flip: { + enabled: this._config.flip + }, + preventOverflow: { + boundariesElement: this._config.boundary + } + } + } + + // Disable Popper.js if we have a static display + if (this._config.display === 'static') { + popperConfig.modifiers.applyStyle = { + enabled: false + } + } + return popperConfig + } + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + const _config = typeof config === 'object' ? config : null + + if (!data) { + data = new Dropdown(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + data[config]() + } + }) + } + + static _clearMenus(event) { + if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || + event.type === 'keyup' && event.which !== TAB_KEYCODE)) { + return + } + + const toggles = $.makeArray($(Selector.DATA_TOGGLE)) + for (let i = 0; i < toggles.length; i++) { + const parent = Dropdown._getParentFromElement(toggles[i]) + const context = $(toggles[i]).data(DATA_KEY) + const relatedTarget = { + relatedTarget: toggles[i] + } + + if (!context) { + continue + } + + const dropdownMenu = context._menu + if (!$(parent).hasClass(ClassName.SHOW)) { + continue + } + + if (event && (event.type === 'click' && + /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && + $.contains(parent, event.target)) { + continue + } + + const hideEvent = $.Event(Event.HIDE, relatedTarget) + $(parent).trigger(hideEvent) + if (hideEvent.isDefaultPrevented()) { + continue + } + + // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support + if ('ontouchstart' in document.documentElement) { + $(document.body).children().off('mouseover', null, $.noop) + } + + toggles[i].setAttribute('aria-expanded', 'false') + + $(dropdownMenu).removeClass(ClassName.SHOW) + $(parent) + .removeClass(ClassName.SHOW) + .trigger($.Event(Event.HIDDEN, relatedTarget)) + } + } + + static _getParentFromElement(element) { + let parent + const selector = Util.getSelectorFromElement(element) + + if (selector) { + parent = $(selector)[0] + } + + return parent || element.parentNode + } + + // eslint-disable-next-line complexity + static _dataApiKeydownHandler(event) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) + ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && + (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || + $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { + return + } + + event.preventDefault() + event.stopPropagation() + + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return + } + + const parent = Dropdown._getParentFromElement(this) + const isActive = $(parent).hasClass(ClassName.SHOW) + + if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || + isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (event.which === ESCAPE_KEYCODE) { + const toggle = $(parent).find(Selector.DATA_TOGGLE)[0] + $(toggle).trigger('focus') + } + + $(this).trigger('click') + return + } + + const items = $(parent).find(Selector.VISIBLE_ITEMS).get() + + if (items.length === 0) { + return + } + + let index = items.indexOf(event.target) + + if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up + index-- + } + + if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down + index++ + } + + if (index < 0) { + index = 0 + } + + items[index].focus() + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler) + .on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler) + .on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus) + .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault() + event.stopPropagation() + Dropdown._jQueryInterface.call($(this), 'toggle') + }) + .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => { + e.stopPropagation() + }) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface + $.fn[NAME].Constructor = Dropdown + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Dropdown._jQueryInterface + } + + return Dropdown +})($, Popper) + +export default Dropdown diff --git a/app/node_modules/bootstrap/js/src/index.js b/app/node_modules/bootstrap/js/src/index.js new file mode 100644 index 00000000..34167e89 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/index.js @@ -0,0 +1,50 @@ +import $ from 'jquery' +import Alert from './alert' +import Button from './button' +import Carousel from './carousel' +import Collapse from './collapse' +import Dropdown from './dropdown' +import Modal from './modal' +import Popover from './popover' +import Scrollspy from './scrollspy' +import Tab from './tab' +import Tooltip from './tooltip' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): index.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +(($) => { + if (typeof $ === 'undefined') { + throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') + } + + const version = $.fn.jquery.split(' ')[0].split('.') + const minMajor = 1 + const ltMajor = 2 + const minMinor = 9 + const minPatch = 1 + const maxMajor = 4 + + if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { + throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0') + } +})($) + +export { + Util, + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Popover, + Scrollspy, + Tab, + Tooltip +} diff --git a/app/node_modules/bootstrap/js/src/modal.js b/app/node_modules/bootstrap/js/src/modal.js new file mode 100644 index 00000000..e8580eb0 --- /dev/null +++ b/app/node_modules/bootstrap/js/src/modal.js @@ -0,0 +1,579 @@ +import $ from 'jquery' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Modal = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'modal' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.modal' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key + + const Default = { + backdrop : true, + keyboard : true, + focus : true, + show : true + } + + const DefaultType = { + backdrop : '(boolean|string)', + keyboard : 'boolean', + focus : 'boolean', + show : 'boolean' + } + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + FOCUSIN : `focusin${EVENT_KEY}`, + RESIZE : `resize${EVENT_KEY}`, + CLICK_DISMISS : `click.dismiss${EVENT_KEY}`, + KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`, + MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`, + MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + SCROLLBAR_MEASURER : 'modal-scrollbar-measure', + BACKDROP : 'modal-backdrop', + OPEN : 'modal-open', + FADE : 'fade', + SHOW : 'show' + } + + const Selector = { + DIALOG : '.modal-dialog', + DATA_TOGGLE : '[data-toggle="modal"]', + DATA_DISMISS : '[data-dismiss="modal"]', + FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', + STICKY_CONTENT : '.sticky-top', + NAVBAR_TOGGLER : '.navbar-toggler' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Modal { + constructor(element, config) { + this._config = this._getConfig(config) + this._element = element + this._dialog = $(element).find(Selector.DIALOG)[0] + this._backdrop = null + this._isShown = false + this._isBodyOverflowing = false + this._ignoreBackdropClick = false + this._scrollbarWidth = 0 + } + + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + // Public + + toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget) + } + + show(relatedTarget) { + if (this._isTransitioning || this._isShown) { + return + } + + if ($(this._element).hasClass(ClassName.FADE)) { + this._isTransitioning = true + } + + const showEvent = $.Event(Event.SHOW, { + relatedTarget + }) + + $(this._element).trigger(showEvent) + + if (this._isShown || showEvent.isDefaultPrevented()) { + return + } + + this._isShown = true + + this._checkScrollbar() + this._setScrollbar() + + this._adjustDialog() + + $(document.body).addClass(ClassName.OPEN) + + this._setEscapeEvent() + this._setResizeEvent() + + $(this._element).on( + Event.CLICK_DISMISS, + Selector.DATA_DISMISS, + (event) => this.hide(event) + ) + + $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => { + $(this._element).one(Event.MOUSEUP_DISMISS, (event) => { + if ($(event.target).is(this._element)) { + this._ignoreBackdropClick = true + } + }) + }) + + this._showBackdrop(() => this._showElement(relatedTarget)) + } + + hide(event) { + if (event) { + event.preventDefault() + } + + if (this._isTransitioning || !this._isShown) { + return + } + + const hideEvent = $.Event(Event.HIDE) + + $(this._element).trigger(hideEvent) + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return + } + + this._isShown = false + const transition = $(this._element).hasClass(ClassName.FADE) + + if (transition) { + this._isTransitioning = true + } + + this._setEscapeEvent() + this._setResizeEvent() + + $(document).off(Event.FOCUSIN) + + $(this._element).removeClass(ClassName.SHOW) + + $(this._element).off(Event.CLICK_DISMISS) + $(this._dialog).off(Event.MOUSEDOWN_DISMISS) + + + if (transition) { + const transitionDuration = Util.getTransitionDurationFromElement(this._element) + + $(this._element) + .one(Util.TRANSITION_END, (event) => this._hideModal(event)) + .emulateTransitionEnd(transitionDuration) + } else { + this._hideModal() + } + } + + dispose() { + $.removeData(this._element, DATA_KEY) + + $(window, document, this._element, this._backdrop).off(EVENT_KEY) + + this._config = null + this._element = null + this._dialog = null + this._backdrop = null + this._isShown = null + this._isBodyOverflowing = null + this._ignoreBackdropClick = null + this._scrollbarWidth = null + } + + handleUpdate() { + this._adjustDialog() + } + + // Private + + _getConfig(config) { + config = { + ...Default, + ...config + } + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _showElement(relatedTarget) { + const transition = $(this._element).hasClass(ClassName.FADE) + + if (!this._element.parentNode || + this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // Don't move modal's DOM position + document.body.appendChild(this._element) + } + + this._element.style.display = 'block' + this._element.removeAttribute('aria-hidden') + this._element.scrollTop = 0 + + if (transition) { + Util.reflow(this._element) + } + + $(this._element).addClass(ClassName.SHOW) + + if (this._config.focus) { + this._enforceFocus() + } + + const shownEvent = $.Event(Event.SHOWN, { + relatedTarget + }) + + const transitionComplete = () => { + if (this._config.focus) { + this._element.focus() + } + this._isTransitioning = false + $(this._element).trigger(shownEvent) + } + + if (transition) { + const transitionDuration = Util.getTransitionDurationFromElement(this._element) + + $(this._dialog) + .one(Util.TRANSITION_END, transitionComplete) + .emulateTransitionEnd(transitionDuration) + } else { + transitionComplete() + } + } + + _enforceFocus() { + $(document) + .off(Event.FOCUSIN) // Guard against infinite focus loop + .on(Event.FOCUSIN, (event) => { + if (document !== event.target && + this._element !== event.target && + $(this._element).has(event.target).length === 0) { + this._element.focus() + } + }) + } + + _setEscapeEvent() { + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN_DISMISS, (event) => { + if (event.which === ESCAPE_KEYCODE) { + event.preventDefault() + this.hide() + } + }) + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN_DISMISS) + } + } + + _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, (event) => this.handleUpdate(event)) + } else { + $(window).off(Event.RESIZE) + } + } + + _hideModal() { + this._element.style.display = 'none' + this._element.setAttribute('aria-hidden', true) + this._isTransitioning = false + this._showBackdrop(() => { + $(document.body).removeClass(ClassName.OPEN) + this._resetAdjustments() + this._resetScrollbar() + $(this._element).trigger(Event.HIDDEN) + }) + } + + _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove() + this._backdrop = null + } + } + + _showBackdrop(callback) { + const animate = $(this._element).hasClass(ClassName.FADE) + ? ClassName.FADE : '' + + if (this._isShown && this._config.backdrop) { + this._backdrop = document.createElement('div') + this._backdrop.className = ClassName.BACKDROP + + if (animate) { + $(this._backdrop).addClass(animate) + } + + $(this._backdrop).appendTo(document.body) + + $(this._element).on(Event.CLICK_DISMISS, (event) => { + if (this._ignoreBackdropClick) { + this._ignoreBackdropClick = false + return + } + if (event.target !== event.currentTarget) { + return + } + if (this._config.backdrop === 'static') { + this._element.focus() + } else { + this.hide() + } + }) + + if (animate) { + Util.reflow(this._backdrop) + } + + $(this._backdrop).addClass(ClassName.SHOW) + + if (!callback) { + return + } + + if (!animate) { + callback() + return + } + + const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop) + + $(this._backdrop) + .one(Util.TRANSITION_END, callback) + .emulateTransitionEnd(backdropTransitionDuration) + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.SHOW) + + const callbackRemove = () => { + this._removeBackdrop() + if (callback) { + callback() + } + } + + if ($(this._element).hasClass(ClassName.FADE)) { + const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop) + + $(this._backdrop) + .one(Util.TRANSITION_END, callbackRemove) + .emulateTransitionEnd(backdropTransitionDuration) + } else { + callbackRemove() + } + } else if (callback) { + callback() + } + } + + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + _adjustDialog() { + const isModalOverflowing = + this._element.scrollHeight > document.documentElement.clientHeight + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = `${this._scrollbarWidth}px` + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = `${this._scrollbarWidth}px` + } + } + + _resetAdjustments() { + this._element.style.paddingLeft = '' + this._element.style.paddingRight = '' + } + + _checkScrollbar() { + const rect = document.body.getBoundingClientRect() + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth + this._scrollbarWidth = this._getScrollbarWidth() + } + + _setScrollbar() { + if (this._isBodyOverflowing) { + // Note: DOMNode.style.paddingRight returns the actual value or '' if not set + // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set + + // Adjust fixed content padding + $(Selector.FIXED_CONTENT).each((index, element) => { + const actualPadding = $(element)[0].style.paddingRight + const calculatedPadding = $(element).css('padding-right') + $(element).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`) + }) + + // Adjust sticky content margin + $(Selector.STICKY_CONTENT).each((index, element) => { + const actualMargin = $(element)[0].style.marginRight + const calculatedMargin = $(element).css('margin-right') + $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`) + }) + + // Adjust navbar-toggler margin + $(Selector.NAVBAR_TOGGLER).each((index, element) => { + const actualMargin = $(element)[0].style.marginRight + const calculatedMargin = $(element).css('margin-right') + $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`) + }) + + // Adjust body padding + const actualPadding = document.body.style.paddingRight + const calculatedPadding = $(document.body).css('padding-right') + $(document.body).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`) + } + } + + _resetScrollbar() { + // Restore fixed content padding + $(Selector.FIXED_CONTENT).each((index, element) => { + const padding = $(element).data('padding-right') + if (typeof padding !== 'undefined') { + $(element).css('padding-right', padding).removeData('padding-right') + } + }) + + // Restore sticky content and navbar-toggler margin + $(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`).each((index, element) => { + const margin = $(element).data('margin-right') + if (typeof margin !== 'undefined') { + $(element).css('margin-right', margin).removeData('margin-right') + } + }) + + // Restore body padding + const padding = $(document.body).data('padding-right') + if (typeof padding !== 'undefined') { + $(document.body).css('padding-right', padding).removeData('padding-right') + } + } + + _getScrollbarWidth() { // thx d.walsh + const scrollDiv = document.createElement('div') + scrollDiv.className = ClassName.SCROLLBAR_MEASURER + document.body.appendChild(scrollDiv) + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth + document.body.removeChild(scrollDiv) + return scrollbarWidth + } + + // Static + + static _jQueryInterface(config, relatedTarget) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + const _config = { + ...Default, + ...$(this).data(), + ...typeof config === 'object' && config ? config : {} + } + + if (!data) { + data = new Modal(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + data[config](relatedTarget) + } else if (_config.show) { + data.show(relatedTarget) + } + }) + } + } + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + let target + const selector = Util.getSelectorFromElement(this) + + if (selector) { + target = $(selector)[0] + } + + const config = $(target).data(DATA_KEY) + ? 'toggle' : { + ...$(target).data(), + ...$(this).data() + } + + if (this.tagName === 'A' || this.tagName === 'AREA') { + event.preventDefault() + } + + const $target = $(target).one(Event.SHOW, (showEvent) => { + if (showEvent.isDefaultPrevented()) { + // Only register focus restorer if modal will actually get shown + return + } + + $target.one(Event.HIDDEN, () => { + if ($(this).is(':visible')) { + this.focus() + } + }) + }) + + Modal._jQueryInterface.call($(target), config, this) + }) + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Modal._jQueryInterface + $.fn[NAME].Constructor = Modal + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Modal._jQueryInterface + } + + return Modal +})($) + +export default Modal diff --git a/app/node_modules/bootstrap/js/src/popover.js b/app/node_modules/bootstrap/js/src/popover.js new file mode 100644 index 00000000..e398ca1f --- /dev/null +++ b/app/node_modules/bootstrap/js/src/popover.js @@ -0,0 +1,188 @@ +import $ from 'jquery' +import Tooltip from './tooltip' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Popover = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'popover' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.popover' + const EVENT_KEY = `.${DATA_KEY}` + const JQUERY_NO_CONFLICT = $.fn[NAME] + const CLASS_PREFIX = 'bs-popover' + const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g') + + const Default = { + ...Tooltip.Default, + placement : 'right', + trigger : 'click', + content : '', + template : '' + } + + const DefaultType = { + ...Tooltip.DefaultType, + content : '(string|element|function)' + } + + const ClassName = { + FADE : 'fade', + SHOW : 'show' + } + + const Selector = { + TITLE : '.popover-header', + CONTENT : '.popover-body' + } + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + INSERTED : `inserted${EVENT_KEY}`, + CLICK : `click${EVENT_KEY}`, + FOCUSIN : `focusin${EVENT_KEY}`, + FOCUSOUT : `focusout${EVENT_KEY}`, + MOUSEENTER : `mouseenter${EVENT_KEY}`, + MOUSELEAVE : `mouseleave${EVENT_KEY}` + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Popover extends Tooltip { + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + static get NAME() { + return NAME + } + + static get DATA_KEY() { + return DATA_KEY + } + + static get Event() { + return Event + } + + static get EVENT_KEY() { + return EVENT_KEY + } + + static get DefaultType() { + return DefaultType + } + + // Overrides + + isWithContent() { + return this.getTitle() || this._getContent() + } + + addAttachmentClass(attachment) { + $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`) + } + + getTipElement() { + this.tip = this.tip || $(this.config.template)[0] + return this.tip + } + + setContent() { + const $tip = $(this.getTipElement()) + + // We use append for html objects to maintain js events + this.setElementContent($tip.find(Selector.TITLE), this.getTitle()) + let content = this._getContent() + if (typeof content === 'function') { + content = content.call(this.element) + } + this.setElementContent($tip.find(Selector.CONTENT), content) + + $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) + } + + // Private + + _getContent() { + return this.element.getAttribute('data-content') || + this.config.content + } + + _cleanTipClass() { + const $tip = $(this.getTipElement()) + const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX) + if (tabClass !== null && tabClass.length > 0) { + $tip.removeClass(tabClass.join('')) + } + } + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + const _config = typeof config === 'object' ? config : null + + if (!data && /destroy|hide/.test(config)) { + return + } + + if (!data) { + data = new Popover(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + data[config]() + } + }) + } + } + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Popover._jQueryInterface + $.fn[NAME].Constructor = Popover + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Popover._jQueryInterface + } + + return Popover +})($) + +export default Popover diff --git a/app/node_modules/bootstrap/js/src/scrollspy.js b/app/node_modules/bootstrap/js/src/scrollspy.js new file mode 100644 index 00000000..091b320b --- /dev/null +++ b/app/node_modules/bootstrap/js/src/scrollspy.js @@ -0,0 +1,329 @@ +import $ from 'jquery' +import Util from './util' + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.1): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const ScrollSpy = (($) => { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'scrollspy' + const VERSION = '4.1.1' + const DATA_KEY = 'bs.scrollspy' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Default = { + offset : 10, + method : 'auto', + target : '' + } + + const DefaultType = { + offset : 'number', + method : 'string', + target : '(string|element)' + } + + const Event = { + ACTIVATE : `activate${EVENT_KEY}`, + SCROLL : `scroll${EVENT_KEY}`, + LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + DROPDOWN_ITEM : 'dropdown-item', + DROPDOWN_MENU : 'dropdown-menu', + ACTIVE : 'active' + } + + const Selector = { + DATA_SPY : '[data-spy="scroll"]', + ACTIVE : '.active', + NAV_LIST_GROUP : '.nav, .list-group', + NAV_LINKS : '.nav-link', + NAV_ITEMS : '.nav-item', + LIST_ITEMS : '.list-group-item', + DROPDOWN : '.dropdown', + DROPDOWN_ITEMS : '.dropdown-item', + DROPDOWN_TOGGLE : '.dropdown-toggle' + } + + const OffsetMethod = { + OFFSET : 'offset', + POSITION : 'position' + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class ScrollSpy { + constructor(element, config) { + this._element = element + this._scrollElement = element.tagName === 'BODY' ? window : element + this._config = this._getConfig(config) + this._selector = `${this._config.target} ${Selector.NAV_LINKS},` + + `${this._config.target} ${Selector.LIST_ITEMS},` + + `${this._config.target} ${Selector.DROPDOWN_ITEMS}` + this._offsets = [] + this._targets = [] + this._activeTarget = null + this._scrollHeight = 0 + + $(this._scrollElement).on(Event.SCROLL, (event) => this._process(event)) + + this.refresh() + this._process() + } + + // Getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + // Public + + refresh() { + const autoMethod = this._scrollElement === this._scrollElement.window + ? OffsetMethod.OFFSET : OffsetMethod.POSITION + + const offsetMethod = this._config.method === 'auto' + ? autoMethod : this._config.method + + const offsetBase = offsetMethod === OffsetMethod.POSITION + ? this._getScrollTop() : 0 + + this._offsets = [] + this._targets = [] + + this._scrollHeight = this._getScrollHeight() + + const targets = $.makeArray($(this._selector)) + + targets + .map((element) => { + let target + const targetSelector = Util.getSelectorFromElement(element) + + if (targetSelector) { + target = $(targetSelector)[0] + } + + if (target) { + const targetBCR = target.getBoundingClientRect() + if (targetBCR.width || targetBCR.height) { + // TODO (fat): remove sketch reliance on jQuery position/offset + return [ + $(target)[offsetMethod]().top + offsetBase, + targetSelector + ] + } + } + return null + }) + .filter((item) => item) + .sort((a, b) => a[0] - b[0]) + .forEach((item) => { + this._offsets.push(item[0]) + this._targets.push(item[1]) + }) + } + + dispose() { + $.removeData(this._element, DATA_KEY) + $(this._scrollElement).off(EVENT_KEY) + + this._element = null + this._scrollElement = null + this._config = null + this._selector = null + this._offsets = null + this._targets = null + this._activeTarget = null + this._scrollHeight = null + } + + // Private + + _getConfig(config) { + config = { + ...Default, + ...typeof config === 'object' && config ? config : {} + } + + if (typeof config.target !== 'string') { + let id = $(config.target).attr('id') + if (!id) { + id = Util.getUID(NAME) + $(config.target).attr('id', id) + } + config.target = `#${id}` + } + + Util.typeCheckConfig(NAME, config, DefaultType) + + return config + } + + _getScrollTop() { + return this._scrollElement === window + ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop + } + + _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max( + document.body.scrollHeight, + document.documentElement.scrollHeight + ) + } + + _getOffsetHeight() { + return this._scrollElement === window + ? window.innerHeight : this._scrollElement.getBoundingClientRect().height + } + + _process() { + const scrollTop = this._getScrollTop() + this._config.offset + const scrollHeight = this._getScrollHeight() + const maxScroll = this._config.offset + + scrollHeight - + this._getOffsetHeight() + + if (this._scrollHeight !== scrollHeight) { + this.refresh() + } + + if (scrollTop >= maxScroll) { + const target = this._targets[this._targets.length - 1] + + if (this._activeTarget !== target) { + this._activate(target) + } + return + } + + if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { + this._activeTarget = null + this._clear() + return + } + + for (let i = this._offsets.length; i--;) { + const isActiveTarget = this._activeTarget !== this._targets[i] && + scrollTop >= this._offsets[i] && + (typeof this._offsets[i + 1] === 'undefined' || + scrollTop < this._offsets[i + 1]) + + if (isActiveTarget) { + this._activate(this._targets[i]) + } + } + } + + _activate(target) { + this._activeTarget = target + + this._clear() + + let queries = this._selector.split(',') + // eslint-disable-next-line arrow-body-style + queries = queries.map((selector) => { + return `${selector}[data-target="${target}"],` + + `${selector}[href="${target}"]` + }) + + const $link = $(queries.join(',')) + + if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { + $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE) + $link.addClass(ClassName.ACTIVE) + } else { + // Set triggered link as active + $link.addClass(ClassName.ACTIVE) + // Set triggered links parents as active + // With both
    and

+ + + + +